DMStagDuplicateWithoutSetup#
duplicate a DMSTAG
object without setting it up
Synopsis#
PetscErrorCode DMStagDuplicateWithoutSetup(DM dm, MPI_Comm comm, DM *newdm)
Collective
Input Parameters#
dm - The original
DM
objectcomm - the MPI communicator for the new DM (
MPI_COMM_NULL
to use the same communicator asdm
)
Output Parameter#
newdm - The new
DM
object
Developer Notes#
Copies over all of the state for a DMSTAG
object, except that which is
populated during DMSetUp()
. This function is used within (all) other
functions that require an un-setup clone, which is common when duplicating,
coarsening, refining, or creating compatible DM
s with different fields. For
this reason it also accepts an MPI communicator as an argument (though note
that at the time of this writing, implementations of DMCoarsen()
and DMRefine()
don’t usually seem to respect their “comm” arguments). This function could be
pushed up to the general DM
API (and perhaps given a different name).
This is an internal function but we provide a man page in case it’s made public
See Also#
DMSTAG: Staggered, Structured Grid, DMSTAG
, DM
, DMClone()
, DMStagCreateCompatibleDMStag()
, DMCoarsen()
, DMRefine()
Level#
developer
Location#
src/dm/impls/stag/stagintern.c
Index of all DMStag routines
Table of Contents for all manual pages
Index of all manual pages