:orphan: # 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 ## Note 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 [](ch_unstructured), `DM`, `DMPLEX`, `DMCreate()` ## Level beginner ## Location src/dm/impls/plex/plexgmsh.c --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/impls/plex/plexgmsh.c) [Index of all DMPlex routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)