Abstract mesh interface. More...
#include <MeshVizXLM/mesh/MiMesh.h>
Public Types | |
enum | Dimension { DIMENSION_I = 0, DIMENSION_J = 1, DIMENSION_K = 2 } |
Public Member Functions | |
virtual | ~MiMesh () |
Protected Member Functions | |
virtual std::ostream & | toStream (std::ostream &s) const =0 |
Friends | |
std::ostream & | operator<< (std::ostream &s, const MiMesh &mesh) |
This interface defines an abstract mesh. An abstract mesh organizes the domain by using a geometry and a topology. Thus, any implementing class of MiMesh must implement the methods getGeometry() and getTopology().
enum MiMesh::Dimension |
virtual MiMesh::~MiMesh | ( | ) | [inline, virtual] |
virtual std::ostream& MiMesh::toStream | ( | std::ostream & | s | ) | const [protected, pure virtual] |
Performs an output operation on a stream which is returned afterward.
This method is protected since only called by the output operator <<. This method is not pure virtual and output by default the geometry and topology of a mesh. Whenever a different output is needed, this method can be implemented in the subclass to get a different output format. No std::ostream& operator << needs to be defined in any subclass. This allows you to benefit from the virtual inheritance when using the output operator on an abstract class.
Implemented in MiLineMeshCurvilinear, MiLineMeshRegular, MiLineMeshUnstructured, MiMeshIjk, MiPointMeshCurvilinear, MiSurfaceMeshCurvilinear, MiSurfaceMeshRectilinear, MiSurfaceMeshRegular, MiSurfaceMeshUnstructured, MiVolumeMeshCurvilinear, MiVolumeMeshHexahedronIjk, MiVolumeMeshRectilinear, MiVolumeMeshRegular, MiVolumeMeshUnstructured, and MiVolumeMeshVertexHexahedronIjk.
std::ostream& operator<< | ( | std::ostream & | s, | |
const MiMesh & | mesh | |||
) | [friend] |
Outputs the mesh to a stream using the toStream protected method implemented in all derived classes.