Lines Matching refs:NewDM
6 PetscErrorCode CloneDMWithNewSection(DM OriginalDM, DM *NewDM, PetscInt NFields) in CloneDMWithNewSection() argument
12 PetscCall(DMClone(OriginalDM, NewDM)); in CloneDMWithNewSection()
13 PetscCall(DMPlexDistributeSetDefault(*NewDM, PETSC_FALSE)); in CloneDMWithNewSection()
14 PetscCall(DMClearDS(*NewDM)); in CloneDMWithNewSection()
18 PetscCall(DMSetNumFields(*NewDM, 1)); in CloneDMWithNewSection()
19 PetscCall(DMSetFromOptions(*NewDM)); in CloneDMWithNewSection()
20 …PetscCall(DMPlexCreateSection(*NewDM, NULL, NumComp, NumDof, 0, NULL, NULL, NULL, NULL, §ion)); in CloneDMWithNewSection()
21 PetscCall(DMSetLocalSection(*NewDM, section)); in CloneDMWithNewSection()
26 PetscCall(DMSetField(*NewDM, 0, NULL, (PetscObject)fe)); in CloneDMWithNewSection()
28 PetscCall(DMCreateDS(*NewDM)); in CloneDMWithNewSection()
39 DM forest, plex, NewDM; in main() local
91 PetscCall(CloneDMWithNewSection(plex, &NewDM, 1)); in main()
92 PetscCall(DMCreateDS(NewDM)); in main()
93 PetscCall(DMCreateGlobalVector(NewDM, &NewDMVecGlobal)); in main()
94 PetscCall(DMCreateLocalVector(NewDM, &NewDMVecLocal)); in main()
96 PetscCall(DMGlobalToLocal(NewDM, NewDMVecGlobal, INSERT_VALUES, NewDMVecLocal)); in main()
99 PetscCall(DMClearDS(NewDM)); in main()
100 PetscCall(DMDestroy(&NewDM)); in main()