:orphan: # PCSetDM Sets the DM that may be used by some preconditioners ## Synopsis ``` #include "petscpc.h" PetscErrorCode PCSetDM(PC pc, DM dm) ``` Logically Collective ## Input Parameters - ***pc -*** the preconditioner context - ***dm -*** the dm, can be NULL ## Developer Note The routines KSP/SNES/TSSetDM() require the dm to be non-NULL, but this one can be NULL since all it does is replace the current DM ## See Also `PCGetDM()`, `KSPSetDM()`, `KSPGetDM()` ## Level intermediate ## Location src/ksp/pc/interface/pcset.c --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ksp/pc/interface/pcset.c) [Index of all PC routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)