Home
last modified time | relevance | path

Searched refs:mesh (Results 1 – 25 of 263) sorted by relevance

1234567891011

/petsc/src/dm/impls/patch/ !
H A Dpatchcreate.c53 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 Dpatch.c320 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 Dplexgmsh.c523 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 Dplexrefine.c118 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 Dplexgenerate.c105 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 Dplex.c1011 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 Dguide_to_subsurface.md3 …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, …
18mesh 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 Dex39.c218 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 Ddapreallocate.c25 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 Dsection.md7 - 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 Ddmplex.md18 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…
126mesh creation) creates a second, discontinuous coordinate field. These values can be accessed usin…
[all …]
/petsc/src/dm/dt/tests/ !
H A Dex10.c107 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 Dex11.c14 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 Dex11f.F908 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 Dex28_glvis_composite_da_1d.out1 MFEM mesh v1.0
79 MFEM mesh v1.0
/petsc/src/ts/tutorials/output/ !
H A Dex12_glvis_da_2d_vect.out1 MFEM mesh v1.0
633 MFEM mesh v1.0
H A Dex12_glvis_da_2d_vect_ll.out1 MFEM mesh v1.0
633 MFEM mesh v1.0
/petsc/src/snes/utils/libceed/ !
H A Ddmplexsnesceed.c27 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 Dex99_msh-vtx.out1 DM Object: mesh-vtx 1 MPI process
3 mesh-vtx in 0 dimensions:
H A Dex99_msh-seg.out1 DM Object: mesh-seg 1 MPI process
3 mesh-seg in 1 dimension:
H A Dex99_msh-tri.out1 DM Object: mesh-tri 1 MPI process
3 mesh-tri in 2 dimensions:
H A Dex99_msh-tet.out1 DM Object: mesh-tet 1 MPI process
3 mesh-tet in 3 dimensions:
H A Dex99_msh-qua.out1 DM Object: mesh-qua 1 MPI process
3 mesh-qua in 2 dimensions:
H A Dex99_msh-wed.out1 DM Object: mesh-wed 1 MPI process
3 mesh-wed in 3 dimensions:
/petsc/src/dm/impls/swarm/tests/ !
H A Dex12.c45 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()

1234567891011