DMPlexCreateGmsh#

Create a DMPLEX mesh from a Gmsh file viewer

Synopsis#

#include "petscdmplex.h"   
PetscErrorCode DMPlexCreateGmsh(MPI_Comm comm, PetscViewer viewer, PetscBool interpolate, DM *dm)

Collective

Input Parameters#

  • comm - The MPI communicator

  • viewer - The PetscViewer associated with a Gmsh file

  • interpolate - Create faces and edges in the mesh

Output Parameter#

  • dm - The DM object representing the mesh

Options Database Keys#

  • -dm_plex_gmsh_hybrid - Force triangular prisms to use tensor order

  • -dm_plex_gmsh_periodic - Read Gmsh periodic section and construct a periodic Plex

  • -dm_plex_gmsh_highorder - Generate high-order coordinates

  • -dm_plex_gmsh_project - Project high-order coordinates to a different space, use the prefix dm_plex_gmsh_project_ to define the space

  • -dm_plex_gmsh_use_regions - Generate labels with region names

  • -dm_plex_gmsh_mark_vertices - Add vertices to generated labels

  • -dm_plex_gmsh_multiple_tags - Allow multiple tags for default labels

  • -dm_plex_gmsh_spacedim - Embedding space dimension, if different from topological dimension

Notes#

The Gmsh file format is described in http://gmsh.info/doc/texinfo/gmsh.html#MSH-file-format

By default, the “Cell Sets”, “Face Sets”, and “Vertex Sets” labels are created, and only insert the first tag on a point. By using -dm_plex_gmsh_multiple_tags, all tags can be inserted. Instead, -dm_plex_gmsh_use_regions creates labels based on the region names from the PhysicalNames section, and all tags are used.

See Also#

DMPlex: Unstructured Grids, DM, DMPLEX, DMCreate()

Level#

beginner

Location#

src/dm/impls/plex/plexgmsh.c


Index of all DMPlex routines
Table of Contents for all manual pages
Index of all manual pages