Dune Core Modules (2.7.1)
Read Gmsh mesh file. More...
#include <dune/grid/io/file/gmshreader.hh>
Static Public Member Functions | |
static ToUniquePtr< Grid > | read (const std::string &fileName, bool verbose=true, bool insertBoundarySegments=true) |
static ToUniquePtr< Grid > | read (const std::string &fileName, std::vector< int > &boundarySegmentToPhysicalEntity, std::vector< int > &elementToPhysicalEntity, bool verbose=true, bool insertBoundarySegments=true) |
static void | read (Dune::GridFactory< Grid > &factory, const std::string &fileName, bool verbose=true, bool insertBoundarySegments=true) |
static void | read (Dune::GridFactory< Grid > &factory, const std::string &fileName, std::vector< int > &boundarySegmentToPhysicalEntity, std::vector< int > &elementToPhysicalEntity, bool verbose=true, bool insertBoundarySegments=true) |
Detailed Description
class Dune::GmshReader< GridType >
Read Gmsh mesh file.
Read a .msh (version 2) file generated using Gmsh and construct a grid using the grid factory interface.
The file format used by gmsh can hold grids that are more general than the simplex grids that the gmsh grid generator is able to construct. We try to read as many grids as possible, as long as they are valid files. You can test this by checking whether gmsh will load the file and display its content.
All grids in a gmsh file live in three-dimensional Euclidean space. If the world dimension of the grid type that you are reading the file into is less than three, the remaining coordinates are simply ignored.
- Note
- Recent versions of Gmsh introduced a new .msh file format (version 4) with a different syntax. This is currently not supported by GmshReader. One can export to an older .msh version as follows:
- select File→Export (or CTRL+E)
- select file format
.msh
- a dialog asks for options
- select 'Version 2 ASCII' and mark 'Save all elements'
Member Function Documentation
◆ read() [1/4]
|
inlinestatic |
- Todo:
- doc me
- Returns
- The return type is a special pointer type that casts into Grid*, std::unique_ptr<Grid>, and std::shared_ptr<Grid>. It is scheduled to be replaced by std::unique_ptr<Grid> eventually.
References Dune::GridFactoryInterface< GridType >::comm(), Dune::GridFactory< GridType >::createGrid(), and Dune::Communication< Communicator >::rank().
◆ read() [2/4]
|
inlinestatic |
- Todo:
- doc me
- Returns
- The return type is a special pointer type that casts into Grid*, std::unique_ptr<Grid>, and std::shared_ptr<Grid>. It is scheduled to be replaced by std::unique_ptr<Grid> eventually.
References Dune::GridFactoryInterface< GridType >::comm(), Dune::GridFactory< GridType >::createGrid(), and Dune::Communication< Communicator >::rank().
◆ read() [3/4]
|
inlinestatic |
- Todo:
- doc me
References Dune::GridFactoryInterface< GridType >::comm(), and Dune::Communication< Communicator >::rank().
◆ read() [4/4]
|
inlinestatic |
- Todo:
- doc me
References Dune::GridFactoryInterface< GridType >::comm(), and Dune::Communication< Communicator >::rank().
The documentation for this class was generated from the following file:
- dune/grid/io/file/gmshreader.hh