A set of template class utilities is provided for convenience as example of implementation of some basic meshes. They are used by some sample programs to create synthetic meshes for the purpose of the demo.
All sample implementation classes start with the Mb prefix and are provided in the folder <OIVHOME>/src/MeshVizXLM/mesh
An example of most mesh interfaces is provided. For instance MiVolumeMeshRegular( C++ ) is implemented by MbVolumeMeshRegular in the folder <OIVHOME>/src/MeshVizXLM/mesh/mesh/volumes.
These example of mesh implementation are for the purpose of the demo. We don’t recommend using them in real applications because doing so requires a copy of the data from the application’s memory to the Mb implementation’s memory. |
The most interesting classes are probably the cell classes. These classes show how to implement the most complex interface by using the cell utility classes.
For instance, the MbHexahedronCell class contains the following implementation of one of the cell methods:
//Reimplemented from MiCell virtual MbVec3d getIsoParametricCoord(const MiGeometryI& meshGeometry, const MbVec3d &point) const { return MxHexahedronCellExtract::getIsoParametricCoord(meshGeometry,this,point); }
Where the MxHexahedronCellExtract( C++ | Java ) static class is used to compute the requested parametric coordinates. Another important point in these cell implementations is that they show exactly the topology organization expected by the MeshViz XLM algorithms. Sample implementation classes are template classes. The template parameters are often the data type used for storing the geometry and the data sets.