Lines Matching refs:dm
21 PetscErrorCode CreateBCLabel(DM dm, const char name[]) { in CreateBCLabel() argument
26 PetscCall(DMCreateLabel(dm, name)); in CreateBCLabel()
27 PetscCall(DMGetLabel(dm, name, &label)); in CreateBCLabel()
28 PetscCall(DMPlexMarkBoundaryFaces(dm, 1, label)); in CreateBCLabel()
34 PetscErrorCode CreateDistributedDM(MPI_Comm comm, AppCtx app_ctx, DM *dm) { in CreateDistributedDM() argument
46 …exCreateBoxMesh(comm, dim, PETSC_FALSE, faces, NULL, NULL, NULL, interpolate, 0, PETSC_FALSE, dm)); in CreateDistributedDM()
48 PetscCall(DMPlexCreateFromFile(comm, filename, NULL, interpolate, dm)); in CreateDistributedDM()
52 PetscCall(DMPlexGetPartitioner(*dm, &part)); in CreateDistributedDM()
54 PetscCall(DMPlexDistribute(*dm, 0, NULL, &distributed_mesh)); in CreateDistributedDM()
56 PetscCall(DMDestroy(dm)); in CreateDistributedDM()
57 *dm = distributed_mesh; in CreateDistributedDM()
59 PetscCall(DMViewFromOptions(*dm, NULL, "-dm_view")); in CreateDistributedDM()
65 PetscErrorCode SetupDMByDegree(DM dm, AppCtx app_ctx, PetscInt order, PetscBool boundary, PetscInt … in SetupDMByDegree() argument
77 PetscCall(DMGetDimension(dm, &dim)); in SetupDMByDegree()
78 PetscCall(PetscObjectGetComm((PetscObject)dm, &comm)); in SetupDMByDegree()
80 PetscCall(DMSetFromOptions(dm)); in SetupDMByDegree()
81 PetscCall(DMAddField(dm, NULL, (PetscObject)fe)); in SetupDMByDegree()
82 PetscCall(DMCreateDS(dm)); in SetupDMByDegree()
87 PetscCall(DMGetCoordinateDim(dm, &num_comp_coord)); in SetupDMByDegree()
89 PetscCall(DMSetCoordinateDisc(dm, fe_coords, PETSC_TRUE)); in SetupDMByDegree()
100 PetscCall(DMHasLabel(dm, "marker", &has_label)); in SetupDMByDegree()
102 PetscCall(CreateBCLabel(dm, "marker")); in SetupDMByDegree()
105 PetscCall(DMGetLabel(dm, "marker", &label)); in SetupDMByDegree()
106 …PetscCall(DMAddBoundary(dm, DM_BC_ESSENTIAL, "mms", label, 1, marker_ids, 0, 0, NULL, (void (*)(vo… in SetupDMByDegree()
109 PetscCall(DMGetLabelIdIS(dm, name, &face_set_is)); in SetupDMByDegree()
113 PetscCall(DMGetLabel(dm, "Face Sets", &label)); in SetupDMByDegree()
114 …PetscCall(DMAddBoundary(dm, DM_BC_ESSENTIAL, "mms", label, num_face_sets, face_set_ids, 0, 0, NULL… in SetupDMByDegree()
121 PetscCall(DMGetLabel(dm, "Face Sets", &label)); in SetupDMByDegree()
126 …PetscCall(DMAddBoundary(dm, DM_BC_ESSENTIAL, bcName, label, 1, &app_ctx->bc_clamp_faces[i], 0, 0, … in SetupDMByDegree()
131 PetscCall(DMPlexSetClosurePermutationTensor(dm, PETSC_DETERMINE, NULL)); in SetupDMByDegree()