Dune Core Modules (2.11.0)
File-Reader for GMsh unstructured .msh files. More...
#include <dune/gmsh4/gmsh4reader.hh>
Public Member Functions | |
| template<class... Args, std::enable_if_t< std::is_constructible< GridCreator, Args... >::value, int > = 0> | |
| Gmsh4Reader (Args &&... args) | |
| Constructor. Creates a new GridCreator with the passed factory. | |
| Gmsh4Reader (GridCreator &creator) | |
| Constructor. Stores the references in a non-destroying shared_ptr. | |
| Gmsh4Reader (std::shared_ptr< GridCreator > creator) | |
| Constructor. Stores the shared_ptr. | |
| void | read (std::string const &filename, bool fillCreator=true) |
Read the grid from file with filename into the GridFactory stored in the GridCreator. More... | |
| std::vector< std::string > const & | pieces () const |
| Return the filenames of parallel pieces. | |
| void | readSerialFileFromStream (std::ifstream &input, bool fillCreator=true) |
| Read the grid from an input stream, referring to a .msh file, into the GridCreator. More... | |
| void | readParallelFileFromStream (std::ifstream &input, int rank, int size, bool fillCreator=true) |
| Read the grid from and input stream, referring to a .pro file, into the GridCreator. More... | |
| void | fillGridCreator (bool insertPieces=true) |
| Construct a grid using the GridCreator. | |
Static Public Member Functions | |
| template<class... Args> | |
| static std::unique_ptr< Grid > | createGridFromFile (const std::string &filename, Args &&... args) |
| template<class... Args> | |
| static void | fillFactory (GridFactory< Grid > &factory, const std::string &filename, Args &&... args) |
Detailed Description
class Dune::Gmsh4Reader< Grid, GridCreator, SizeType >
File-Reader for GMsh unstructured .msh files.
Reads .msh files version 4.x and constructs a grid from the cells stored in the file Additionally, stored data can be read.
- Template Parameters
-
Grid Type of the grid to construct. GridCreator Policy type to control what to pass to a grid factory with data given from the file. See GridCreatorInterface [ContinuousGridCreator] SizeType Data type for indices in the .msh file. Should match in size the data_sizeinformation in the header of the .msh file. This type is used for the internal data in the caches. [std::size_t]
Member Function Documentation
◆ createGridFromFile()
|
inlinestaticinherited |
Reads the grid from a file with filename and returns a unique_ptr to the created grid. Redirects to concrete implementation of derivated class.
◆ fillFactory()
|
inlinestaticinherited |
Reads the grid from a file with filename into a grid-factory. Redirects to concrete implementation of derivated class.
◆ read()
| void Dune::Gmsh4Reader< G, C, S >::read | ( | std::string const & | filename, |
| bool | fillCreator = true |
||
| ) |
Read the grid from file with filename into the GridFactory stored in the GridCreator.
- Parameters
-
filename The name of the input file fillCreator If false, only fill internal data structures, iftrue, also calls fillGridCreator. [true]
References DUNE_THROW, GMSH4_ASSERT, GMSH4_ASSERT_MSG, Dune::GeometryTypes::line, Dune::GmshReader< GridType >::read(), and Dune::size().
◆ readParallelFileFromStream()
| void Dune::Gmsh4Reader< G, C, S >::readParallelFileFromStream | ( | std::ifstream & | input, |
| int | rank, | ||
| int | size, | ||
| bool | fillCreator = true |
||
| ) |
Read the grid from and input stream, referring to a .pro file, into the GridCreator.
- Parameters
-
input A STL input stream to read the Gmsh file from. fillCreator If false, only fill internal data structures, iftrue, also calls fillGridCreator. [true]
References DUNE_THROW.
◆ readSerialFileFromStream()
| void Dune::Gmsh4Reader< G, C, S >::readSerialFileFromStream | ( | std::ifstream & | input, |
| bool | fillCreator = true |
||
| ) |
Read the grid from an input stream, referring to a .msh file, into the GridCreator.
Advanced read methods
- Parameters
-
input A STL input stream to read the Gmsh file from. fillCreator If false, only fill internal data structures, iftrue, also calls fillGridCreator. [true]
References Dune::GeometryTypes::line.
The documentation for this class was generated from the following files:
- dune/gmsh4/gmsh4reader.hh
- dune/gmsh4/gmsh4reader.impl.hh
|
Legal Statements / Impressum |
Hosted by TU Dresden & Uni Heidelberg |
generated with Hugo v0.111.3
(Feb 14, 23:39, 2026)