:orphan: # DMAdaptorSetSolver Sets the solver used to produce discrete solutions ## Synopsis ``` #include "petscdmadaptor.h" PetscErrorCode DMAdaptorSetSolver(DMAdaptor adaptor, SNES snes) ``` Not Collective ## Input Parameters - ***adaptor -*** The `DMAdaptor` object - ***snes -*** The solver ## Note The solver MUST have an attached `DM`/`PetscDS`, so that we know the exact solution ## See Also `DMAdaptor`, `DMAdaptorGetSolver()`, `DMAdaptorCreate()`, `DMAdaptorAdapt()` ## Level intermediate ## Location src/snes/utils/dmadapt.c --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/snes/utils/dmadapt.c) [Index of all SNES routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)