Lines Matching refs:topo

178   DMFTopology_pforest *topo;  member
237 static PetscErrorCode DMFTopologyDestroy_pforest(DMFTopology_pforest **topo) in DMFTopologyDestroy_pforest() argument
240 if (!*topo) PetscFunctionReturn(PETSC_SUCCESS); in DMFTopologyDestroy_pforest()
241 if (--((*topo)->refct) > 0) { in DMFTopologyDestroy_pforest()
242 *topo = NULL; in DMFTopologyDestroy_pforest()
245 if ((*topo)->geom) PetscCallP4est(p4est_geometry_destroy, ((*topo)->geom)); in DMFTopologyDestroy_pforest()
246 PetscCallP4est(p4est_connectivity_destroy, ((*topo)->conn)); in DMFTopologyDestroy_pforest()
247 PetscCall(PetscFree((*topo)->tree_face_to_uniq)); in DMFTopologyDestroy_pforest()
248 PetscCall(PetscFree(*topo)); in DMFTopologyDestroy_pforest()
249 *topo = NULL; in DMFTopologyDestroy_pforest()
256 …t(DM dm, PetscInt N[], PetscInt P[], PetscReal B[], DMFTopology_pforest **topo, PetscBool useMorto… in DMFTopologyCreateBrick_pforest() argument
263 PetscCall(PetscNew(topo)); in DMFTopologyCreateBrick_pforest()
265 (*topo)->refct = 1; in DMFTopologyCreateBrick_pforest()
267 …PetscCallP4estReturn((*topo)->conn, p4est_connectivity_new_brick, ((int)N[0], (int)N[1], (P[0] == … in DMFTopologyCreateBrick_pforest()
269 …PetscCallP4estReturn((*topo)->conn, p8est_connectivity_new_brick, ((int)N[0], (int)N[1], (int)N[2]… in DMFTopologyCreateBrick_pforest()
271 numVerts = (*topo)->conn->num_vertices; in DMFTopologyCreateBrick_pforest()
272 vertices = (*topo)->conn->vertices; in DMFTopologyCreateBrick_pforest()
278 (*topo)->geom = NULL; in DMFTopologyCreateBrick_pforest()
279 PetscCall(PforestConnectivityEnumerateFacets((*topo)->conn, &(*topo)->tree_face_to_uniq)); in DMFTopologyCreateBrick_pforest()
284 …rorCode DMFTopologyCreate_pforest(DM dm, DMForestTopology topologyName, DMFTopology_pforest **topo) in DMFTopologyCreate_pforest() argument
293 PetscAssertPointer(topo, 3); in DMFTopologyCreate_pforest()
323 PetscCall(DMFTopologyCreateBrick_pforest(dm, N, P, B, topo, useMorton)); in DMFTopologyCreate_pforest()
326 PetscCall(PetscNew(topo)); in DMFTopologyCreate_pforest()
328 (*topo)->refct = 1; in DMFTopologyCreate_pforest()
329 PetscCallP4estReturn((*topo)->conn, p4est_connectivity_new_byname, (name)); in DMFTopologyCreate_pforest()
330 (*topo)->geom = NULL; in DMFTopologyCreate_pforest()
340 PetscCallP4estReturn((*topo)->geom, p8est_geometry_new_shell, ((*topo)->conn, R2, R1)); in DMFTopologyCreate_pforest()
349 PetscCallP4estReturn((*topo)->geom, p8est_geometry_new_sphere, ((*topo)->conn, R2, R1, R0)); in DMFTopologyCreate_pforest()
352 PetscCall(PforestConnectivityEnumerateFacets((*topo)->conn, &(*topo)->tree_face_to_uniq)); in DMFTopologyCreate_pforest()
395 PetscCall(DMFTopologyDestroy_pforest(&pforest->topo)); in DMForestDestroy_pforest()
413 if (pforest->topo) pforest->topo->refct++; in DMForestTemplate_pforest()
414 PetscCall(DMFTopologyDestroy_pforest(&tpforest->topo)); in DMForestTemplate_pforest()
415 tpforest->topo = pforest->topo; in DMForestTemplate_pforest()
731 …PetscCheck(apforest->topo, PetscObjectComm((PetscObject)dm), PETSC_ERR_ARG_WRONGSTATE, "The pre-ad… in DMSetUp_pforest()
747 DMFTopology_pforest *topo; in DMSetUp_pforest() local
774 PetscCall(PetscNew(&topo)); in DMSetUp_pforest()
775 topo->refct = 1; in DMSetUp_pforest()
776 topo->conn = conn; in DMSetUp_pforest()
777 topo->geom = NULL; in DMSetUp_pforest()
797 topo->geom = geom; in DMSetUp_pforest()
800 topo->tree_face_to_uniq = tree_face_to_uniq; in DMSetUp_pforest()
801 pforest->topo = topo; in DMSetUp_pforest()
809 PetscCall(DMFTopologyCreateBrick_pforest(dm,N,P,&pforest->topo,PETSC_FALSE)); in DMSetUp_pforest()
847 DMFTopology_pforest *topo; in DMSetUp_pforest() local
849 PetscCall(DMFTopologyCreate_pforest(dm, topoName, &topo)); in DMSetUp_pforest()
850 pforest->topo = topo; in DMSetUp_pforest()
1006 … (comm, pforest->topo->conn, 0, /* minimum number of quadrants per processor */ in DMSetUp_pforest()
1384 geom = pforest->topo->geom; in DMView_VTK_pforest()
1398 …if (!pforest->topo->geom) PetscCallP4estReturn(geom, p4est_geometry_new_connectivity, (pforest->to… in DMView_VTK_pforest()
1420 if (!pforest->topo->geom) PetscCallP4est(p4est_geometry_destroy, (geom)); in DMView_VTK_pforest()
2360 …PetscCheck(pforestC->topo == pforestF->topo, PetscObjectComm((PetscObject)coarse), PETSC_ERR_ARG_I… in DMPforestGetTransferSF_Point()
2904 …PetscCheck(pforestC->topo == pforestF->topo, PetscObjectComm((PetscObject)coarse), PETSC_ERR_ARG_I… in DMPforestGetTransferSF_Internal()
3044 p4est_topidx_t num_trees = pforest->topo->conn->num_trees; in DMPforestLabelsInitialize()
3053 p4est_connectivity_t *conn = pforest->topo->conn; in DMPforestLabelsInitialize()
3275 PetscInt f = pforest->topo->tree_face_to_uniq[P4EST_FACES * t + l]; in DMPforestLabelsInitialize()
3320 f = pforest->topo->tree_face_to_uniq[P4EST_FACES * t + f]; in DMPforestLabelsInitialize()
3328 PetscInt e = pforest->topo->conn->tree_to_edge[P8EST_EDGES * t + l]; in DMPforestLabelsInitialize()
3379 f = pforest->topo->tree_face_to_uniq[P4EST_FACES * t + f]; in DMPforestLabelsInitialize()
3438 e = pforest->topo->conn->tree_to_edge[P8EST_EDGES * t + e]; in DMPforestLabelsInitialize()
3450 PetscInt v = pforest->topo->conn->tree_to_corner[P4EST_CHILDREN * t + l]; in DMPforestLabelsInitialize()
3713 geom = pforest->topo->geom; in DMPforestMapCoordinates()
3800 … PetscCall(DMPforestMapCoordinates_Cell(plex, geom, count, quad, t, pforest->topo->conn, coords)); in DMPforestMapCoordinates()
3812 …PetscCall(DMPforestMapCoordinates_Cell(plex, geom, count, &quads[i], t, pforest->topo->conn, coord… in DMPforestMapCoordinates()
3824 …DMPforestMapCoordinates_Cell(plex, geom, count + cLocalEnd, quad, t, pforest->topo->conn, coords)); in DMPforestMapCoordinates()
5189 pforest->topo = NULL; in DMCreate_pforest()