| FEAT 3
    Finite Element Analysis Toolbox | 
Mesh file writer class. More...
#include <mesh_file_writer.hpp>
| Public Member Functions | |
| MeshFileWriter (std::ostream &os, bool indent=true) | |
| Creates a writer for a given output stream.  More... | |
| virtual | ~MeshFileWriter () | 
| virtual destructor  More... | |
| template<typename RootMesh_ > | |
| void | write (const RootMeshNode< RootMesh_ > *mesh_node, const MeshAtlas< RootMesh_ > *mesh_atlas=nullptr, const PartitionSet *part_set=nullptr, bool skip_internal_meshparts=true) | 
| Writes a full domain to the file.  More... | |
| template<typename RootMesh_ > | |
| void | write_atlas (const MeshAtlas< RootMesh_ > &mesh_atlas) | 
| Writes all charts of an atlas into the file.  More... | |
| template<typename RootMesh_ > | |
| void | write_chart (const Atlas::ChartBase< RootMesh_ > &chart, const String &name) | 
| Writes a chart into the file.  More... | |
| template<typename Shape_ , int num_coords_, typename Coord_ > | |
| void | write_mesh (const ConformalMesh< Shape_, num_coords_, Coord_ > &mesh) | 
| Writes a (root) mesh into the file.  More... | |
| template<typename Mesh_ > | |
| void | write_meshpart (const MeshPart< Mesh_ > &meshpart, const String &parent_name, const String &part_name, const String &chart_name) | 
| Writes a mesh-part into the file.  More... | |
| void | write_only (const PartitionSet &part_set) | 
| void | write_partition (const Partition &partition) | 
| Writes a partition to the file.  More... | |
| void | write_partition_set (const PartitionSet &part_set) | 
| Writes all partitions of a partition set to the file.  More... | |
| Protected Member Functions | |
| void | _pop_indent () | 
| decreases the current indent by two spaces  More... | |
| void | _push_indent () | 
| increases the current indent by two spaces  More... | |
| template<typename Data_ > | |
| void | _write_attribute (const AttributeSet< Data_ > &attr, const String &name) | 
| Writes an attribute of a mesh part into the file.  More... | |
| template<int num_coords_, typename Coord_ > | |
| void | _write_vertex_set (const VertexSet< num_coords_, Coord_ > &vertex_set) | 
| Writes a vertex-set of a mesh into the file.  More... | |
| Protected Attributes | |
| bool | _indent | 
| specifies whether indentation is to be used  More... | |
| std::ostream & | _os | 
| the output stream to write to  More... | |
| String | _sindent | 
| the current indentation string  More... | |
Mesh file writer class.
This class implements a writer which can export objects of type MeshAtlas, RootMeshNode and PartitionSet (and all of their sub-objects) into the XML-based FEAT mesh file format.
Definition at line 125 of file mesh_file_writer.hpp.
| 
 | inlineexplicit | 
Creates a writer for a given output stream.
| [in] | os | The output stream to write to. | 
| [in] | indent | Specifies whether indentation is to be used. Can be set to falseto decrease the final file size. | 
Definition at line 180 of file mesh_file_writer.hpp.
| 
 | inlinevirtual | 
virtual destructor
Definition at line 189 of file mesh_file_writer.hpp.
| 
 | inlineprotected | 
decreases the current indent by two spaces
Definition at line 163 of file mesh_file_writer.hpp.
References _indent, and _sindent.
Referenced by _write_attribute(), _write_vertex_set(), write(), write_mesh(), write_meshpart(), and write_partition().
| 
 | inlineprotected | 
increases the current indent by two spaces
Definition at line 156 of file mesh_file_writer.hpp.
References _indent, and _sindent.
Referenced by _write_attribute(), _write_vertex_set(), write(), write_mesh(), write_meshpart(), and write_partition().
| 
 | inlineprotected | 
Writes an attribute of a mesh part into the file.
| [in] | attr | The attribute that is to be exported. | 
| [in] | name | The name of the attribute. | 
Definition at line 476 of file mesh_file_writer.hpp.
References _os, _pop_indent(), _push_indent(), _sindent, FEAT::Geometry::AttributeSet< DataType_ >::get_dimension(), and FEAT::Geometry::AttributeSet< DataType_ >::get_num_values().
Referenced by write_meshpart().
| 
 | inlineprotected | 
Writes a vertex-set of a mesh into the file.
| [in] | vertex_set | 
Definition at line 450 of file mesh_file_writer.hpp.
References _os, _pop_indent(), _push_indent(), _sindent, and FEAT::Geometry::VertexSet< num_coords_, Coord_ >::get_num_vertices().
Referenced by write_mesh().
| 
 | inline | 
Writes a full domain to the file.
| [in] | mesh_node | A transient pointer to the root mesh node whose mesh and child mesh-parts are to be exported. May be nullptrif no mesh or mesh-parts are to be exported. | 
| [in] | mesh_atlas | A transient pointer to the mesh atlas whose charts are to be exported. May be nullptrif no charts are to be exported. | 
| [in] | part_set | A transient pointer to the partition set whose partitions are to be exported. May be nullptrif no partitions are to be exported. | 
| [in] | skip_internal_meshparts | Specifies whether internal mesh-parts (e.g. comm halos or partition patches) are to be exported or not. Defaults to true, i.e. internal mesh parts are not exported by default. | 
Definition at line 373 of file mesh_file_writer.hpp.
References _os, _pop_indent(), _push_indent(), FEAT::Geometry::MeshNode< RootMesh_, ThisMesh_ >::find_mesh_part(), FEAT::Geometry::MeshNode< RootMesh_, ThisMesh_ >::find_mesh_part_chart_name(), FEAT::Geometry::MeshNode< RootMesh_, ThisMesh_ >::get_mesh(), FEAT::Geometry::MeshNode< RootMesh_, ThisMesh_ >::get_mesh_part_names(), write_atlas(), write_mesh(), write_meshpart(), and write_partition_set().
| 
 | inline | 
Writes all charts of an atlas into the file.
| [in] | mesh_atlas | A transient reference to the atlas whose charts are to be exported. | 
Definition at line 221 of file mesh_file_writer.hpp.
References FEAT::Geometry::MeshAtlas< Mesh_ >::find_mesh_chart(), FEAT::Geometry::MeshAtlas< Mesh_ >::get_chart_names(), write_chart(), and XASSERTM.
Referenced by write().
| 
 | inline | 
Writes a chart into the file.
| [in] | chart | A transient reference to the chart to be exported. | 
| [in] | name | The name of the chart. | 
Definition at line 203 of file mesh_file_writer.hpp.
References _indent, _os, and _sindent.
Referenced by write_atlas().
| 
 | inline | 
Writes a (root) mesh into the file.
| [in] | mesh | A transient reference to the (root) mesh to be exported. | 
Definition at line 243 of file mesh_file_writer.hpp.
References _os, _pop_indent(), _push_indent(), _sindent, _write_vertex_set(), FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::get_num_entities(), and FEAT::Geometry::ConformalMesh< Shape_, num_coords_, Coord_ >::get_vertex_set().
Referenced by write().
| 
 | inline | 
Writes a mesh-part into the file.
| [in] | meshpart | A transient reference to the mesh-part to be exported. | 
| [in] | parent_name | The name of the parent of the mesh-part. | 
| [in] | part_name | The name of the mesh-part | 
| [in] | chart_name | The name of the chart of the mesh-part. | 
Definition at line 276 of file mesh_file_writer.hpp.
References _os, _pop_indent(), _push_indent(), _sindent, _write_attribute(), FEAT::Geometry::MeshPart< MeshType_ >::get_mesh_attributes(), FEAT::Geometry::MeshPart< MeshType_ >::get_num_entities(), and FEAT::Geometry::MeshPart< MeshType_ >::has_topology().
Referenced by write().
| 
 | inline | 
Definition at line 434 of file mesh_file_writer.hpp.
| 
 | inline | 
Writes a partition to the file.
| [in] | partition | A transient reference to the partition to be exported. | 
Definition at line 314 of file mesh_file_writer.hpp.
References _os, _pop_indent(), _push_indent(), _sindent, FEAT::Adjacency::Graph::degree(), FEAT::Geometry::Partition::get_level(), FEAT::Geometry::Partition::get_name(), FEAT::Geometry::Partition::get_num_elements(), FEAT::Geometry::Partition::get_num_patches(), FEAT::Geometry::Partition::get_patches(), FEAT::Geometry::Partition::get_priority(), FEAT::Adjacency::Graph::image_begin(), and FEAT::Adjacency::Graph::image_end().
Referenced by write_partition_set().
| 
 | inline | 
Writes all partitions of a partition set to the file.
| [in] | part_set | A transient reference to the partition set whose partitions are to be exported. | 
Definition at line 347 of file mesh_file_writer.hpp.
References write_partition().
Referenced by write().
| 
 | protected | 
specifies whether indentation is to be used
Definition at line 131 of file mesh_file_writer.hpp.
Referenced by MeshFileWriter(), _pop_indent(), _push_indent(), and write_chart().
| 
 | protected | 
the output stream to write to
Definition at line 129 of file mesh_file_writer.hpp.
Referenced by _write_attribute(), _write_vertex_set(), write(), write_chart(), write_mesh(), write_meshpart(), and write_partition().
| 
 | protected | 
the current indentation string
Definition at line 133 of file mesh_file_writer.hpp.
Referenced by MeshFileWriter(), _pop_indent(), _push_indent(), _write_attribute(), _write_vertex_set(), write_chart(), write_mesh(), write_meshpart(), and write_partition().