Lines Matching refs:dm
5 static PetscErrorCode ComputeVolume(DM dm) in ComputeVolume() argument
13 PetscCall(DMGetDimension(dm, &dim)); in ComputeVolume()
15 PetscCall(DMGetCoordinatesLocalSetUp(dm)); in ComputeVolume()
16 PetscCall(DMGetLabel(dm, "EGADS Body ID", &bodyLabel)); in ComputeVolume()
17 PetscCall(DMGetLabel(dm, "EGADS Face ID", &faceLabel)); in ComputeVolume()
18 PetscCall(DMGetLabel(dm, "EGADS Edge ID", &edgeLabel)); in ComputeVolume()
20 PetscCall(DMPlexGetHeightStratum(dm, 0, &pStart, &pEnd)); in ComputeVolume()
24 PetscCall(DMPlexComputeCellGeometryFVM(dm, p, &vol, NULL, NULL)); in ComputeVolume()
28 PetscCall(DMPlexGetHeightStratum(dm, 1, &pStart, &pEnd)); in ComputeVolume()
32 PetscCall(DMPlexComputeCellGeometryFVM(dm, p, &vol, NULL, NULL)); in ComputeVolume()
37 PetscCall(PetscObjectGetName((PetscObject)dm, &name)); in ComputeVolume()
38 …PetscCall(PetscPrintf(PetscObjectComm((PetscObject)dm), "DM %s: Surface Area = %.6e Volume = %.6e\… in ComputeVolume()
44 DM dm; in main() local
47 PetscCall(DMCreate(PETSC_COMM_WORLD, &dm)); in main()
48 PetscCall(DMSetType(dm, DMPLEX)); in main()
49 PetscCall(DMSetFromOptions(dm)); in main()
50 PetscCall(DMViewFromOptions(dm, NULL, "-dm_view")); in main()
52 PetscCall(PetscObjectSetOptionsPrefix((PetscObject)dm, "ref1_")); in main()
53 PetscCall(DMSetFromOptions(dm)); in main()
54 PetscCall(DMViewFromOptions(dm, NULL, "-dm_view")); in main()
56 PetscCall(PetscObjectSetOptionsPrefix((PetscObject)dm, "inf1_")); in main()
57 PetscCall(DMPlexInflateToGeomModel(dm, PETSC_TRUE)); in main()
58 PetscCall(DMViewFromOptions(dm, NULL, "-dm_view")); in main()
60 PetscCall(PetscObjectSetOptionsPrefix((PetscObject)dm, "ref2_")); in main()
61 PetscCall(DMSetFromOptions(dm)); in main()
62 PetscCall(DMViewFromOptions(dm, NULL, "-dm_view")); in main()
64 PetscCall(PetscObjectSetOptionsPrefix((PetscObject)dm, "inf2_")); in main()
65 PetscCall(DMPlexInflateToGeomModel(dm, PETSC_TRUE)); in main()
66 PetscCall(DMViewFromOptions(dm, NULL, "-dm_view")); in main()
68 PetscCall(ComputeVolume(dm)); in main()
69 PetscCall(DMDestroy(&dm)); in main()