Lines Matching refs:newdm

124 PetscErrorCode DMClone(DM dm, DM *newdm)  in DMClone()  argument
135 PetscAssertPointer(newdm, 2); in DMClone()
136 PetscCall(DMCreate(PetscObjectComm((PetscObject)dm), newdm)); in DMClone()
137 PetscCall(DMCopyLabels(dm, *newdm, PETSC_COPY_VALUES, PETSC_TRUE, DM_COPY_LABELS_FAIL)); in DMClone()
138 (*newdm)->leveldown = dm->leveldown; in DMClone()
139 (*newdm)->levelup = dm->levelup; in DMClone()
140 (*newdm)->prealloc_only = dm->prealloc_only; in DMClone()
141 (*newdm)->prealloc_skip = dm->prealloc_skip; in DMClone()
142 PetscCall(PetscFree((*newdm)->vectype)); in DMClone()
143 PetscCall(PetscStrallocpy(dm->vectype, (char **)&(*newdm)->vectype)); in DMClone()
144 PetscCall(PetscFree((*newdm)->mattype)); in DMClone()
145 PetscCall(PetscStrallocpy(dm->mattype, (char **)&(*newdm)->mattype)); in DMClone()
147 PetscCall(DMSetDimension(*newdm, dim)); in DMClone()
148 PetscTryTypeMethod(dm, clone, newdm); in DMClone()
149 (*newdm)->setupcalled = dm->setupcalled; in DMClone()
151 PetscCall(DMSetPointSF(*newdm, sf)); in DMClone()
153 PetscCall(DMSetApplicationContext(*newdm, ctx)); in DMClone()
155 PetscCall(DMReorderSectionSetDefault(*newdm, flg)); in DMClone()
157 PetscCall(DMReorderSectionSetType(*newdm, otype)); in DMClone()
175 if (i) PetscCall(DMSetCellCoordinateDM(*newdm, ncdm)); in DMClone()
176 else PetscCall(DMSetCoordinateDM(*newdm, ncdm)); in DMClone()
182 PetscCall(DMSetCoordinateDim(*newdm, cdim)); in DMClone()
185 PetscCall(DMSetCoordinatesLocal(*newdm, coords)); in DMClone()
188 if (coords) PetscCall(DMSetCoordinates(*newdm, coords)); in DMClone()
192 PetscCall(DMSetCellCoordinatesLocal(*newdm, coords)); in DMClone()
195 if (coords) PetscCall(DMSetCellCoordinates(*newdm, coords)); in DMClone()
201 PetscCall(DMSetPeriodicity(*newdm, maxCell, Lstart, L)); in DMClone()
207 PetscCall(DMSetAdjacency(*newdm, PETSC_DEFAULT, useCone, useClosure)); in DMClone()
2733 PetscErrorCode DMCopyTransform(DM dm, DM newdm) in DMCopyTransform() argument
2737 PetscValidHeaderSpecific(newdm, DM_CLASSID, 2); in DMCopyTransform()
2738 newdm->transformCtx = dm->transformCtx; in DMCopyTransform()
2739 newdm->transformSetUp = dm->transformSetUp; in DMCopyTransform()
2740 newdm->transformDestroy = NULL; in DMCopyTransform()
2741 newdm->transformGetMatrix = dm->transformGetMatrix; in DMCopyTransform()
2742 if (newdm->transformSetUp) PetscCall(DMConstructBasisTransform_Internal(newdm)); in DMCopyTransform()
4229 PetscErrorCode DMLoad(DM newdm, PetscViewer viewer) in DMLoad() argument
4234 PetscValidHeaderSpecific(newdm, DM_CLASSID, 1); in DMLoad()
4245 …PetscCheck(classid == DM_FILE_CLASSID, PetscObjectComm((PetscObject)newdm), PETSC_ERR_ARG_WRONG, "… in DMLoad()
4247 PetscCall(DMSetType(newdm, type)); in DMLoad()
4248 PetscTryTypeMethod(newdm, load, viewer); in DMLoad()
4250 PetscTryTypeMethod(newdm, load, viewer); in DMLoad()
5204 PetscErrorCode DMCopyFields(DM dm, PetscInt minDegree, PetscInt maxDegree, DM newdm) in DMCopyFields() argument
5209 if (dm == newdm) PetscFunctionReturn(PETSC_SUCCESS); in DMCopyFields()
5211 PetscCall(DMClearFields(newdm)); in DMCopyFields()
5224 PetscCall(DMSetField(newdm, f, label, (PetscObject)newfe)); in DMCopyFields()
5227 PetscCall(DMSetField(newdm, f, label, field)); in DMCopyFields()
5230 PetscCall(DMSetAdjacency(newdm, f, useCone, useClosure)); in DMCopyFields()
5234 PetscCall(PetscFree2(newdm->nullspaceConstructors, newdm->nearnullspaceConstructors)); in DMCopyFields()
5235 … PetscCall(PetscCalloc2(Nf, &newdm->nullspaceConstructors, Nf, &newdm->nearnullspaceConstructors)); in DMCopyFields()
6357 PetscErrorCode DMCopyDS(DM dm, PetscInt minDegree, PetscInt maxDegree, DM newdm) in DMCopyDS() argument
6362 if (dm == newdm) PetscFunctionReturn(PETSC_SUCCESS); in DMCopyDS()
6364 PetscCall(DMClearDS(newdm)); in DMCopyDS()
6373 PetscCall(DMTransferDS_Internal(newdm, label, fields, minDegree, maxDegree, ds, dsIn)); in DMCopyDS()
6375 PetscCall(DMGetRegionDS(newdm, label, NULL, &newds, NULL)); in DMCopyDS()
6386 PetscCall(DMCompleteBCLabels_Internal(newdm)); in DMCopyDS()
6408 PetscErrorCode DMCopyDisc(DM dm, DM newdm) in DMCopyDisc() argument
6411 PetscCall(DMCopyFields(dm, PETSC_DETERMINE, PETSC_DETERMINE, newdm)); in DMCopyDisc()
6412 PetscCall(DMCopyDS(dm, PETSC_DETERMINE, PETSC_DETERMINE, newdm)); in DMCopyDisc()