|
FEAT 3
Finite Element Analysis Toolbox
|
Mesh file reader class. More...
#include <mesh_file_reader.hpp>
Public Types | |
| enum class | MeshType { unknown = 0 , conformal } |
| mesh type enumeration More... | |
| enum class | ShapeType { unknown = 0 , simplex , hypercube } |
| shape type enumeration More... | |
Public Member Functions | |
| MeshFileReader () | |
| default constructor More... | |
| MeshFileReader (const MeshFileReader &)=delete | |
| MeshFileReader (std::istream &is) | |
| Input-Stream constructor. More... | |
| virtual | ~MeshFileReader () |
| virtual destructor More... | |
| void | add_mesh_file (const Dist::Comm &comm, const String &filename) |
| Adds a single mesh file to the list of streams to be parsed. More... | |
| void | add_mesh_file (const String &filename) |
| Adds a single mesh file to the list of streams to be parsed. More... | |
| void | add_mesh_files (const Dist::Comm &comm, const std::deque< String > &filenames, String dirpath="") |
| Adds a list of mesh files to the list of streams to be parsed. More... | |
| void | add_mesh_files (const std::deque< String > &filenames, String dirpath="") |
| Adds a list of mesh files to the list of streams to be parsed. More... | |
| void | add_stream (std::istream &is) |
| Adds an input stream to the list of streams to be parsed. More... | |
| MeshType | get_mesh_type () const |
| Returns the mesh-type from the root markup node. More... | |
| const String & | get_meshtype_string () const |
| Returns the mesh-type string from the root markup node. More... | |
| int | get_shape_dim () const |
| Returns the shape-dimension from the root markup node. More... | |
| ShapeType | get_shape_type () const |
| Returns the shape-type from the root markup node. More... | |
| int | get_world_dim () const |
| Returns the world-dimension from the root markup node. More... | |
| MeshFileReader & | operator= (const MeshFileReader &)=delete |
| template<typename RootMesh_ > | |
| std::unique_ptr< RootMeshNode< RootMesh_ > > | parse (MeshAtlas< RootMesh_ > &mesh_atlas, PartitionSet *part_set=nullptr) |
| Parses the mesh file into a mesh node and a mesh atlas. More... | |
| template<typename RootMesh_ > | |
| void | parse (MeshNodeLinker< RootMesh_ > &linker, RootMeshNode< RootMesh_ > &root_mesh_node, MeshAtlas< RootMesh_ > &mesh_atlas, PartitionSet *part_set=nullptr) |
| Parses the mesh file into a mesh node and a mesh atlas. More... | |
| template<typename RootMesh_ > | |
| void | parse (RootMeshNode< RootMesh_ > &root_mesh_node, MeshAtlas< RootMesh_ > &mesh_atlas, PartitionSet *part_set=nullptr) |
| Parses the mesh file into a mesh node and a mesh atlas. More... | |
| void | read_root_markup () |
| Reads the root markup from the input stream and analyses it. More... | |
Protected Attributes | |
| bool | _have_root_markup |
| Did we read the root markup yet? More... | |
| MeshType | _mesh_type |
| String | _mesh_type_string |
| The parsed mesh type. More... | |
| std::deque< std::shared_ptr< Xml::Scanner > > | _scanners |
| Our Xml scanner objects. More... | |
| int | _shape_dim |
| ShapeType | _shape_type |
| std::deque< std::shared_ptr< std::stringstream > > | _streams |
| Our internally managed streams. More... | |
| int | _world_dim |
Mesh file reader class.
This class implements the reader which parses the XML-based FEAT mesh files into the corresponding Geometry class objects of type MeshAtlas, RootMeshNode and PartitionSet.
The basic usage is as follows:
For more details on meshes, see the related doxygen page FEAT Mesh File Format.
Definition at line 1323 of file mesh_file_reader.hpp.
|
strong |
mesh type enumeration
| Enumerator | |
|---|---|
| unknown | unknown mesh type |
| conformal | conformal mesh type |
Definition at line 1327 of file mesh_file_reader.hpp.
|
strong |
shape type enumeration
| Enumerator | |
|---|---|
| unknown | unknown shape type |
| simplex | simplex shape type |
| hypercube | hypercube shape type |
Definition at line 1336 of file mesh_file_reader.hpp.
|
inlineexplicit |
default constructor
Definition at line 1367 of file mesh_file_reader.hpp.
|
inlineexplicit |
Input-Stream constructor.
| [in] | is | The input stream that is to be parsed. |
Definition at line 1383 of file mesh_file_reader.hpp.
References _scanners.
|
inlinevirtual |
virtual destructor
Definition at line 1399 of file mesh_file_reader.hpp.
|
inline |
Adds a single mesh file to the list of streams to be parsed.
| [in] | comm | The communicator to be used for parallel file I/O. |
| [in] | filename | The mesh filename that is to be parsed. |
Definition at line 1495 of file mesh_file_reader.hpp.
References add_mesh_files().
Referenced by add_mesh_file().
|
inline |
Adds a single mesh file to the list of streams to be parsed.
| [in] | filename | The mesh filename that is to be parsed. |
Definition at line 1508 of file mesh_file_reader.hpp.
References add_mesh_file(), and FEAT::Dist::Comm::world().
|
inline |
Adds a list of mesh files to the list of streams to be parsed.
| [in] | comm | The communicator to be used for parallel file I/O. |
| [in] | filenames | A list of mesh filenames that are to be parsed. |
| [in] | dirpath | The path in which the mesh files are located. |
Definition at line 1431 of file mesh_file_reader.hpp.
References _have_root_markup, _streams, add_stream(), FEAT::DistFileIO::read_common(), and XASSERTM.
Referenced by add_mesh_file(), add_mesh_files(), and FEAT::Control::Domain::PartiDomainControl< DomainLevel_ >::create().
|
inline |
Adds a list of mesh files to the list of streams to be parsed.
| [in] | filenames | A list of mesh filenames that are to be parsed. |
| [in] | dirpath | The path in which the mesh files are located. |
Definition at line 1480 of file mesh_file_reader.hpp.
References add_mesh_files(), and FEAT::Dist::Comm::world().
|
inline |
Adds an input stream to the list of streams to be parsed.
| [in] | is | The input stream that is to be added to the list. |
Definition at line 1411 of file mesh_file_reader.hpp.
References _have_root_markup, _scanners, and XASSERTM.
Referenced by add_mesh_files().
|
inline |
Returns the mesh-type from the root markup node.
Definition at line 1539 of file mesh_file_reader.hpp.
|
inline |
Returns the mesh-type string from the root markup node.
Definition at line 1524 of file mesh_file_reader.hpp.
References _mesh_type_string.
|
inline |
Returns the shape-dimension from the root markup node.
Definition at line 1569 of file mesh_file_reader.hpp.
|
inline |
Returns the shape-type from the root markup node.
Definition at line 1554 of file mesh_file_reader.hpp.
|
inline |
Returns the world-dimension from the root markup node.
Definition at line 1584 of file mesh_file_reader.hpp.
|
inline |
Parses the mesh file into a mesh node and a mesh atlas.
| [in,out] | mesh_atlas | A transient reference to the mesh atlas into which charts are to be added. Is also used to search for charts for mesh parts. |
| [in,out] | part_set | A transient pointer to the partition set that partitions are added to. May be nullptr, if the partitions are to be ignored. |
Definition at line 1757 of file mesh_file_reader.hpp.
References FEAT::Geometry::RootMeshNode< RootMesh_ >::make_unique(), and parse().
|
inline |
Parses the mesh file into a mesh node and a mesh atlas.
| [in,out] | linker | A transient reference to the linker that the post-parse tasks are to be added to. |
| [in,out] | root_mesh_node | A transient reference to the root mesh node into which the mesh and the mesh parts are to be added. |
| [in,out] | mesh_atlas | A transient reference to the mesh atlas into which charts are to be added. Is also used to search for charts for mesh parts. |
| [in,out] | part_set | A transient pointer to the partition set that partitions are added to. May be nullptr, if the partitions are to be ignored. |
Definition at line 1692 of file mesh_file_reader.hpp.
References _have_root_markup, _scanners, and read_root_markup().
Referenced by FEAT::Control::Domain::PartiDomainControl< DomainLevel_ >::create(), and parse().
|
inline |
Parses the mesh file into a mesh node and a mesh atlas.
| [in,out] | root_mesh_node | A transient reference to the root mesh node into which the mesh and the mesh parts are to be added. |
| [in,out] | mesh_atlas | A transient reference to the mesh atlas into which charts are to be added. Is also used to search for charts for mesh parts. |
| [in,out] | part_set | A transient pointer to the partition set that partitions are added to. May be nullptr, if the partitions are to be ignored. |
Definition at line 1726 of file mesh_file_reader.hpp.
References FEAT::Geometry::MeshNodeLinker< RootMesh_ >::execute(), and parse().
|
inline |
Reads the root markup from the input stream and analyses it.
Definition at line 1592 of file mesh_file_reader.hpp.
References _have_root_markup, _mesh_type_string, _scanners, conformal, FEAT::Xml::Scanner::get_cur_attribs(), FEAT::Xml::Scanner::get_cur_name(), hypercube, FEAT::Xml::Scanner::read_root(), simplex, FEAT::String::split_by_string(), FEAT::Xml::Scanner::throw_content(), FEAT::Xml::Scanner::throw_grammar(), and XASSERTM.
Referenced by parse().
|
protected |
Did we read the root markup yet?
Definition at line 1352 of file mesh_file_reader.hpp.
Referenced by add_mesh_files(), add_stream(), parse(), and read_root_markup().
|
protected |
Definition at line 1357 of file mesh_file_reader.hpp.
|
protected |
The parsed mesh type.
Definition at line 1354 of file mesh_file_reader.hpp.
Referenced by get_meshtype_string(), and read_root_markup().
|
protected |
Our Xml scanner objects.
Definition at line 1350 of file mesh_file_reader.hpp.
Referenced by MeshFileReader(), ~MeshFileReader(), add_stream(), parse(), and read_root_markup().
|
protected |
Definition at line 1361 of file mesh_file_reader.hpp.
|
protected |
Definition at line 1359 of file mesh_file_reader.hpp.
|
protected |
Our internally managed streams.
Definition at line 1348 of file mesh_file_reader.hpp.
Referenced by ~MeshFileReader(), and add_mesh_files().
|
protected |
Definition at line 1363 of file mesh_file_reader.hpp.