| /petsc/src/dm/impls/patch/ ! |
| H A D | patchcreate.c | 53 DM_Patch *mesh; in DMCreate_Patch() local 57 PetscCall(PetscNew(&mesh)); in DMCreate_Patch() 58 dm->data = mesh; in DMCreate_Patch() 60 mesh->refct = 1; in DMCreate_Patch() 61 mesh->dmCoarse = NULL; in DMCreate_Patch() 62 mesh->patchSize.i = 0; in DMCreate_Patch() 63 mesh->patchSize.j = 0; in DMCreate_Patch() 64 mesh->patchSize.k = 0; in DMCreate_Patch() 65 mesh->patchSize.c = 0; in DMCreate_Patch() 91 PetscErrorCode DMPatchCreate(MPI_Comm comm, DM *mesh) in DMPatchCreate() argument [all …]
|
| H A D | patch.c | 320 DM_Patch *mesh = (DM_Patch *)dm->data; in DMPatchView_ASCII() local 331 PetscCall(DMView(mesh->dmCoarse, viewer)); in DMPatchView_ASCII() 351 DM_Patch *mesh = (DM_Patch *)dm->data; in DMDestroy_Patch() local 354 if (--mesh->refct > 0) PetscFunctionReturn(PETSC_SUCCESS); in DMDestroy_Patch() 355 PetscCall(DMDestroy(&mesh->dmCoarse)); in DMDestroy_Patch() 357 PetscCall(PetscFree(mesh)); in DMDestroy_Patch() 363 DM_Patch *mesh = (DM_Patch *)dm->data; in DMSetUp_Patch() local 367 PetscCall(DMSetUp(mesh->dmCoarse)); in DMSetUp_Patch() 373 DM_Patch *mesh = (DM_Patch *)dm->data; in DMCreateGlobalVector_Patch() local 377 PetscCall(DMCreateGlobalVector(mesh->dmCoarse, g)); in DMCreateGlobalVector_Patch() [all …]
|
| /petsc/src/dm/impls/plex/ ! |
| H A D | plexgmsh.c | 523 static PetscErrorCode GmshMeshCreate(GmshMesh **mesh) in GmshMeshCreate() argument 526 PetscCall(PetscNew(mesh)); in GmshMeshCreate() 527 PetscCall(PetscSegBufferCreate(sizeof(PetscInt), 0, &(*mesh)->segbuf)); in GmshMeshCreate() 531 static PetscErrorCode GmshMeshDestroy(GmshMesh **mesh) in GmshMeshDestroy() argument 536 if (!*mesh) PetscFunctionReturn(PETSC_SUCCESS); in GmshMeshDestroy() 537 PetscCall(GmshEntitiesDestroy(&(*mesh)->entities)); in GmshMeshDestroy() 538 PetscCall(GmshNodesDestroy(&(*mesh)->nodelist)); in GmshMeshDestroy() 539 PetscCall(GmshElementsDestroy(&(*mesh)->elements)); in GmshMeshDestroy() 540 PetscCall(PetscFree((*mesh)->periodMap)); in GmshMeshDestroy() 541 PetscCall(PetscFree((*mesh)->vertexMap)); in GmshMeshDestroy() [all …]
|
| H A D | plexrefine.c | 118 DM_Plex *mesh = (DM_Plex *)dm->data; in DMPlexSetTransformType() local 123 PetscCall(PetscFree(mesh->transformType)); in DMPlexSetTransformType() 124 PetscCall(PetscStrallocpy(type, &mesh->transformType)); in DMPlexSetTransformType() 143 DM_Plex *mesh = (DM_Plex *)dm->data; in DMPlexGetTransformType() local 148 *type = mesh->transformType; in DMPlexGetTransformType() 154 DM_Plex *mesh = (DM_Plex *)dm->data; in DMPlexSetTransform() local 160 PetscCall(DMPlexTransformDestroy(&mesh->transform)); in DMPlexSetTransform() 161 mesh->transform = tr; in DMPlexSetTransform() 167 DM_Plex *mesh = (DM_Plex *)dm->data; in DMPlexGetTransform() local 172 *tr = mesh->transform; in DMPlexGetTransform() [all …]
|
| H A D | plexgenerate.c | 105 DM_Plex *mesh = (DM_Plex *)dm->data; in DMPlexTriangleSetOptions() local 110 PetscCall(PetscFree(mesh->triangleOpts)); in DMPlexTriangleSetOptions() 111 PetscCall(PetscStrallocpy(opts, &mesh->triangleOpts)); in DMPlexTriangleSetOptions() 130 DM_Plex *mesh = (DM_Plex *)dm->data; in DMPlexTetgenSetOptions() local 135 PetscCall(PetscFree(mesh->tetgenOpts)); in DMPlexTetgenSetOptions() 136 PetscCall(PetscStrallocpy(opts, &mesh->tetgenOpts)); in DMPlexTetgenSetOptions() 161 PetscErrorCode DMPlexGenerate(DM boundary, const char name[], PetscBool interpolate, DM *mesh) in DMPlexGenerate() argument 185 PetscCall((*fl->generate)(boundary, interpolate, mesh)); in DMPlexGenerate() 194 PetscCall((*fl->generate)(boundary, interpolate, mesh)); in DMPlexGenerate()
|
| H A D | plex.c | 1011 DM_Plex *mesh = (DM_Plex *)dm->data; in DMPlexView_Ascii() local 1047 PetscCall(PetscSectionGetDof(mesh->supportSection, p, &dof)); in DMPlexView_Ascii() 1048 PetscCall(PetscSectionGetOffset(mesh->supportSection, p, &off)); in DMPlexView_Ascii() 1049 …edPrintf(viewer, "[%d]: %" PetscInt_FMT " ----> %" PetscInt_FMT "\n", rank, p, mesh->supports[s])); in DMPlexView_Ascii() 1057 PetscCall(PetscSectionGetDof(mesh->coneSection, p, &dof)); in DMPlexView_Ascii() 1058 PetscCall(PetscSectionGetOffset(mesh->coneSection, p, &off)); in DMPlexView_Ascii() 1059 …nt_FMT " <---- %" PetscInt_FMT " (%" PetscInt_FMT ")\n", rank, p, mesh->cones[c], mesh->coneOrient… in DMPlexView_Ascii() 1134 if (mesh->periodic.face_sfs) in DMPlexView_Ascii() 1135 …for (PetscInt i = 0; i < mesh->periodic.num_face_sfs; i++) PetscCall(PetscSFView(mesh->periodic.fa… in DMPlexView_Ascii() 2820 DM_Plex *mesh = (DM_Plex *)dm->data; in DMDestroy_Plex() local [all …]
|
| /petsc/doc/tutorials/meshing/ ! |
| H A D | guide_to_subsurface.md | 3 …The user inputs a surface mesh, a refinement prescription, and an extrusion prescription in order … 7 For example, a very simple mesh would start with a square surface mesh divided into two triangles, … 18 …mesh had 5 edges, so we would expect 10 edges for the two surfaces and four edges connecting those… 33 **Surface mesh refined twice** 36 and the extruded mesh can be visualized using VTK. Here I make the image using Paraview, and give t… 39 …rch="dm_impls_plex_tutorials-ex10_1" EXTRA_OPTIONS="-dm_view hdf5:$PETSC_DIR/mesh.h5 -dm_extrude 3" 40 $ $PETSC_DIR/lib/petsc/bin/petsc_gen_xmdf.py mesh.h5 46 **Extruded mesh with refined surface** 52 …="dm_impls_plex_tutorials-ex10_2" EXTRA_OPTIONS="-dm_view hdf5:$PETSC_DIR/mesh.h5 -dm_partition_vi… 53 $ $PETSC_DIR/lib/petsc/bin/petsc_gen_xmdf.py mesh.h5 [all …]
|
| /petsc/src/dm/impls/plex/tests/ ! |
| H A D | ex39.c | 218 static PetscErrorCode PerturbMesh(DM *mesh, PetscScalar *coordVals, PetscInt npoints, PetscInt dim) in PerturbMesh() argument 225 PetscCall(DMGetCoordinateDim(*mesh, &dim)); in PerturbMesh() 226 PetscCall(DMGetLocalBoundingBox(*mesh, minCoords, maxCoords)); in PerturbMesh() 250 static PetscErrorCode SkewMesh(DM *mesh, PetscScalar *coordVals, PetscInt npoints, PetscInt dim) in SkewMesh() argument 287 static PetscErrorCode TransformMesh(UserCtx *user, DM *mesh) in TransformMesh() argument 294 PetscCall(DMGetCoordinates(*mesh, &coords)); in TransformMesh() 297 PetscCall(DMGetCoordinateDim(*mesh, &dim)); in TransformMesh() 302 PetscCall(PerturbMesh(mesh, coordVals, npoints, dim)); in TransformMesh() 305 PetscCall(SkewMesh(mesh, coordVals, npoints, dim)); in TransformMesh() 308 PetscCall(SkewMesh(mesh, coordVals, npoints, dim)); in TransformMesh() [all …]
|
| /petsc/src/dm/impls/da/ ! |
| H A D | dapreallocate.c | 25 DM_DA *mesh = (DM_DA *)dm->data; in DMDASetPreallocationCenterDimension() local 29 mesh->preallocCenterDim = preallocCenterDim; in DMDASetPreallocationCenterDimension() 55 DM_DA *mesh = (DM_DA *)dm->data; in DMDAGetPreallocationCenterDimension() local 60 *preallocCenterDim = mesh->preallocCenterDim; in DMDAGetPreallocationCenterDimension()
|
| /petsc/doc/manual/ ! |
| H A D | section.md | 7 - the relationship between the layout of data over a mesh (or similar structure) and the data layou… 13 without explicit reference to the mesh (topology) or discretization (analysis). 15 While `PetscSection` is currently only employed for `DMPlex`, `DMForest`, and `DMNetwork` mesh desc… 16 …l explain the basic concepts of a `PetscSection` that are generalizable to other mesh descriptions. 22 …) in a `Vec` (or a simple array) can be associated with a "location" on a mesh (or other types of … 23 …cInt` that serves as an abstract "index" into arrays from iterable sets, such as k-cells in a mesh. 24 …volume grid, or as complex as the topological entities of an unstructured mesh (cells, faces, edge… 26 …` is a mapping between the mesh points and a tuple `(ndof, offset)`, where `ndof` is the number of… 27 So given the tuple for a mesh point, its data can be accessed by `array[offset + d]`, where `d` in … 29 ### Charts: Defining mesh points [all …]
|
| H A D | dmplex.md | 18 treats all the different pieces of a mesh, e.g. cells, faces, edges, and 24 All pieces of the mesh (vertices, edges, faces, and cells) are treated as *points* (or mesh entitie… 25 `PetscInt`. A mesh is built by relating points to other points, in 34 For example, we can encode the doublet mesh as in {numref}`fig_doubletMesh`, 39 A 2D doublet mesh, two triangles sharing an edge. 48 The Hasse diagram for our 2D doublet mesh, expressed as a DAG. 51 To use the PETSc API, we consecutively number the mesh pieces. The 62 First, we declare the set of points present in a mesh, 124 …ng functions over the mesh, such as the coordinates. The second method is to use a non-periodic to… 126 …mesh creation) creates a second, discontinuous coordinate field. These values can be accessed usin… [all …]
|
| /petsc/src/dm/dt/tests/ ! |
| H A D | ex10.c | 107 static PetscErrorCode CreateMesh(MPI_Comm comm, AppCtx *ctx, DM *mesh) in CreateMesh() argument 110 PetscCall(DMCreate(comm, mesh)); in CreateMesh() 111 PetscCall(DMSetType(*mesh, DMPLEX)); in CreateMesh() 112 PetscCall(DMSetFromOptions(*mesh)); in CreateMesh() 113 PetscCall(DMSetApplicationContext(*mesh, ctx)); in CreateMesh() 114 PetscCall(DMViewFromOptions(*mesh, NULL, "-dm_view")); in CreateMesh() 147 static PetscErrorCode SetupDiscretization(DM mesh, DM mesh_sum, PetscErrorCode (*setup)(DM, AppCtx … in SetupDiscretization() argument 149 DM cdm = mesh, cdm_sum = mesh_sum; in SetupDiscretization() 156 PetscCall(DMGetDimension(mesh, &dim)); in SetupDiscretization() 157 PetscCall(DMPlexIsSimplex(mesh, &simplex)); in SetupDiscretization() [all …]
|
| /petsc/src/mat/tutorials/ ! |
| H A D | ex11.c | 14 Mat mesh, dual; in main() local 48 PetscCall(MatCreateMPIAdj(MPI_COMM_WORLD, ncells, Nvertices, ii, jj, NULL, &mesh)); in main() 49 PetscCall(MatMeshToCellGraph(mesh, 2, &dual)); in main() 60 PetscCall(MatDestroy(&mesh)); in main()
|
| H A D | ex11f.F90 | 8 Mat :: mesh, dual 40 …MatCreateMPIAdj(PETSC_COMM_WORLD, ncells, Nvertices, ii, jj, PETSC_NULL_INTEGER_ARRAY, mesh, ierr)) 41 PetscCallA(MatMeshToCellGraph(mesh, two, dual, ierr)) 52 PetscCallA(MatDestroy(mesh, ierr))
|
| /petsc/src/snes/tutorials/output/ ! |
| H A D | ex28_glvis_composite_da_1d.out | 1 MFEM mesh v1.0 79 MFEM mesh v1.0
|
| /petsc/src/ts/tutorials/output/ ! |
| H A D | ex12_glvis_da_2d_vect.out | 1 MFEM mesh v1.0 633 MFEM mesh v1.0
|
| H A D | ex12_glvis_da_2d_vect_ll.out | 1 MFEM mesh v1.0 633 MFEM mesh v1.0
|
| /petsc/src/snes/utils/libceed/ ! |
| H A D | dmplexsnesceed.c | 27 DM_Plex *mesh = (DM_Plex *)dm->data; in DMPlexSNESComputeResidualCEED() local 29 if (mesh->printFEM) { in DMPlexSNESComputeResidualCEED() 43 PetscCall(DMPrintLocalVec(dm, "Residual", mesh->printTol, locFbc)); in DMPlexSNESComputeResidualCEED()
|
| /petsc/src/dm/impls/plex/tests/output/ ! |
| H A D | ex99_msh-vtx.out | 1 DM Object: mesh-vtx 1 MPI process 3 mesh-vtx in 0 dimensions:
|
| H A D | ex99_msh-seg.out | 1 DM Object: mesh-seg 1 MPI process 3 mesh-seg in 1 dimension:
|
| H A D | ex99_msh-tri.out | 1 DM Object: mesh-tri 1 MPI process 3 mesh-tri in 2 dimensions:
|
| H A D | ex99_msh-tet.out | 1 DM Object: mesh-tet 1 MPI process 3 mesh-tet in 3 dimensions:
|
| H A D | ex99_msh-qua.out | 1 DM Object: mesh-qua 1 MPI process 3 mesh-qua in 2 dimensions:
|
| H A D | ex99_msh-wed.out | 1 DM Object: mesh-wed 1 MPI process 3 mesh-wed in 3 dimensions:
|
| /petsc/src/dm/impls/swarm/tests/ ! |
| H A D | ex12.c | 45 static PetscErrorCode CreateSwarm(DM mesh, DM *swarm, UserContext *user) in CreateSwarm() argument 52 PetscCall(PetscObjectGetComm((PetscObject)mesh, &comm)); in CreateSwarm() 58 PetscCall(DMGetDimension(mesh, &dim)); in CreateSwarm() 61 PetscCall(DMSwarmSetCellDM(*swarm, mesh)); in CreateSwarm()
|