Lines Matching refs:dm
120 static PetscErrorCode CreateBCLabel(DM dm, const char name[]) { in CreateBCLabel() argument
124 PetscCall(DMCreateLabel(dm, name)); in CreateBCLabel()
125 PetscCall(DMGetLabel(dm, name, &label)); in CreateBCLabel()
126 PetscCall(DMPlexMarkBoundaryFaces(dm, PETSC_DETERMINE, label)); in CreateBCLabel()
127 PetscCall(DMPlexLabelComplete(dm, label)); in CreateBCLabel()
134 PetscErrorCode SetupDMByDegree(DM dm, PetscInt p_degree, PetscInt q_extra, PetscInt num_comp_u, Pet… in SetupDMByDegree() argument
143 PetscCall(DMPlexIsSimplex(dm, &is_simplex)); in SetupDMByDegree()
145 PetscCall(PetscObjectGetComm((PetscObject)dm, &comm)); in SetupDMByDegree()
147 PetscCall(DMAddField(dm, NULL, (PetscObject)fe)); in SetupDMByDegree()
148 PetscCall(DMCreateDS(dm)); in SetupDMByDegree()
154 PetscCall(DMGetCoordinateDim(dm, &num_comp_coord)); in SetupDMByDegree()
156 PetscCall(DMSetCoordinateDisc(dm, fe_coords, PETSC_TRUE)); in SetupDMByDegree()
166 PetscCall(DMHasLabel(dm, "marker", &has_label)); in SetupDMByDegree()
168 PetscCall(CreateBCLabel(dm, "marker")); in SetupDMByDegree()
171 PetscCall(DMGetLabel(dm, "marker", &label)); in SetupDMByDegree()
172 …PetscCall(DMAddBoundary(dm, DM_BC_ESSENTIAL, "wall", label, 1, marker_ids, 0, 0, NULL, NULL, NULL,… in SetupDMByDegree()
173 PetscCall(DMSetOptionsPrefix(dm, "final_")); in SetupDMByDegree()
174 PetscCall(DMViewFromOptions(dm, NULL, "-dm_view")); in SetupDMByDegree()
179 PetscCall(DMGetCoordinateDM(dm, &dm_coord)); in SetupDMByDegree()
180 PetscCall(DMPlexSetClosurePermutationTensor(dm, PETSC_DETERMINE, NULL)); in SetupDMByDegree()
190 PetscErrorCode CreateRestrictionFromPlex(Ceed ceed, DM dm, CeedInt height, DMLabel domain_label, Ce… in CreateRestrictionFromPlex() argument
195 …PetscCall(DMPlexGetLocalOffsets(dm, domain_label, value, height, 0, &num_elem, &elem_size, &num_co… in CreateRestrictionFromPlex()
224 PetscErrorCode DMFieldToDSField(DM dm, DMLabel domain_label, PetscInt dm_field, PetscInt *ds_field)… in DMFieldToDSField() argument
232 PetscCall(DMGetRegionDS(dm, domain_label, &field_is, &ds, NULL)); in DMFieldToDSField()
243 …if (*ds_field == -1) SETERRQ(PetscObjectComm((PetscObject)dm), PETSC_ERR_SUP, "Could not find dm_f… in DMFieldToDSField()
250 PetscErrorCode BasisCreateFromTabulation(Ceed ceed, DM dm, DMLabel domain_label, PetscInt label_val… in BasisCreateFromTabulation() argument
275 PetscCall(DMPlexGetDepth(dm, &depth)); in BasisCreateFromTabulation()
276 PetscCall(DMPlexGetDepthLabel(dm, &depth_label)); in BasisCreateFromTabulation()
281 …PetscCall(DMGetFirstLabeledPoint(dm, dm, domain_label ? domain_label : depth_label, 1, ids, height… in BasisCreateFromTabulation()
282 PetscCall(DMPlexGetCellType(dm, first_point, &cell_type)); in BasisCreateFromTabulation()
284 …if (!elem_topo) SETERRQ(PetscObjectComm((PetscObject)dm), PETSC_ERR_SUP, "DMPlex topology not supp… in BasisCreateFromTabulation()
304 PetscCall(DMPlexIsSimplex(dm, &is_simplex)); in BasisCreateFromTabulation()
309 PetscCall(DMGetLocalSection(dm, §ion)); in BasisCreateFromTabulation()
310 …PetscCall(PetscSectionGetClosurePermutation(section, (PetscObject)dm, dim, num_comp * P, &permutat… in BasisCreateFromTabulation()
345 PetscErrorCode CreateBasisFromPlex(Ceed ceed, DM dm, DMLabel domain_label, CeedInt label_value, Cee… in CreateBasisFromPlex() argument
355 PetscCall(DMGetRegionDS(dm, domain_label, NULL, &ds, NULL)); in CreateBasisFromPlex()
356 PetscCall(DMFieldToDSField(dm, domain_label, dm_field, &ds_field)); in CreateBasisFromPlex()
362 PetscCall(DMPlexIsSimplex(dm, &is_simplex)); in CreateBasisFromPlex()
370 …PetscCall(BasisCreateFromTabulation(ceed, dm, domain_label, label_value, height, face, fe, basis_t… in CreateBasisFromPlex()
412 PetscErrorCode CreateDistributedDM(RunParams rp, DM *dm) { in CreateDistributedDM() argument
416 PetscCall(DMPlexCreateFromFile(PETSC_COMM_WORLD, rp->filename, NULL, PETSC_TRUE, dm)); in CreateDistributedDM()
428 …OMM_WORLD, rp->dim, rp->simplex, rp->mesh_elem, NULL, NULL, NULL, PETSC_TRUE, 0, PETSC_FALSE, dm)); in CreateDistributedDM()
431 PetscCall(DMSetFromOptions(*dm)); in CreateDistributedDM()
432 PetscCall(DMViewFromOptions(*dm, NULL, "-dm_view")); in CreateDistributedDM()