petsc-3.13.6 2020-09-29
Report Typos and Errors

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 object
comm - the MPI communicator for the new DM (MPI_COMM_NULL to use the same communicator as dm)

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 DMs 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).

.seealso: 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