![]() |
GemaMesh
The GeMA Mesh Plugin
|
Basic class for a plugin mesh. Implements the needed functions for a GmMesh interface, storing node values. More...
#include <gmpNodeMesh.h>


Public Member Functions | |
| GmpNodeMesh (GmSimulationData *simulation, QString id, QString description, const GmLogCategory &logger) | |
| Constructor. Will be called by the plugin loading code. | |
| virtual | ~GmpNodeMesh () |
| Destructor. | |
| virtual const char * | pluginName () const |
| virtual const char * | pluginType () const |
| virtual bool | hasCapability (QString capabilityName) const |
| virtual bool | useDualVectors () const |
| virtual void | pushProxy (lua_State *L, const GmLogCategory &logger) |
| virtual bool | loadPrivateData (LuaTable &table) |
| See behaviour comments on the base class. When inheriting from this class, the idea is that this function does not need to be overridden. Only initCellData(), should be extended. If inheriting from GmpCellMeshBase, its initCellData() implementation requires that cellSize() and cellAllocator() be provided as well. | |
| virtual GmValueInfo * | nodeCoordInfo () const |
| virtual GmValueAccessor * | nodeCoordAccessor (Unit desiredUnit, const GmLogCategory &logger) const |
| virtual int | numNodes () const |
| virtual int | numGhostNodes () const |
| virtual const QMap< QString, GmNodeSet * > & | nodeSets () const |
| virtual int | addNodes (int numNodes) |
| virtual int | addGhostNodes (int numNodes) |
| virtual void | clear () |
| virtual size_t | nodeMemory () const |
| virtual size_t | nodeSetsMemory () const |
| virtual GmPCR * | pcrObject () const |
Protected Member Functions | |
| virtual GmpCellMeshData< Vector > * | initCellData (LuaTable &table, bool *ghostSupport, bool *ok) |
| Virtual function that should be overridden for derived classes that need to load cells. It is called by gmpNodeMesh::loadPrivateData() to initialize the cell data object for cell meshes, returning the cell data object itself or NULL for node meshes. Gets as parameter the mesh table + an in/out flag that states if the user requested ghost nodes support or not. It may update that flag with the cell mesh requirements, so that a mesh that requires ghost support (like a mesh with support for hierarchical elements), can express so. The ok flag should be set to false if there was any error initializing the data. Notice that a node mesh should return NULL and set ok to true. | |
| virtual GmpMeshLoader< Vector > * | meshLoader () |
| Returns the mesh loader used to load mesh data. This function should be replaced for using a custom mesh loader. | |
| virtual int | controlMapStateItemType () |
| virtual bool | addStateGeometryData (GmStateDump *state, int groupId) |
| virtual bool | fillDumpControlMapData (QVariantMap *map, const GmLogCategory &logger) |
| virtual bool | dumpControlMapDataLoaded (QVariantMap *map, const GmLogCategory &logger) |
Protected Attributes | |
| GmpNodeMeshData< Vector > | _nd |
| The complete node data. | |
| GmPCR * | _pcr |
| PCR object. Not stored inside _nd since that class does not have access to the model data for correctly destroying _pcr. | |
| bool | _ownPcr |
| Do we own the PCR object? (will be true if the object was instanced internally) | |
Basic class for a plugin mesh. Implements the needed functions for a GmMesh interface, storing node values.
This class is a template as an implementation convenience. Since the base class is a type "Mesh" that can be GmMesh, GmCellMesh or other derived interfaces, GmpNodeMesh can be used to provide node storing for node only interfaces (GmMesh) or cell based interfaces (GmCellMesh, GmElementMesh, ...).
GmpNodeMeshData and GmpCellMeshData are the classes responsible for real storage of per node and per cell information. The Vector template parameter defines which kind of vector object should be used to store node/cell data by the XxxxMeshData classes. It can be either GmSingleVector or GmDualVector.
The downside of having GmpNodeMesh be a template is the need to implement all its methods in the header file, but that is minimized by the use of the loader and mesh data auxiliary classes.
When inheriting from this class, if a custom loader is needed to load additional mesh information, the meshLoader() virtual function can be replaced to provide a new loader derived from GmpMeshLoader.
|
inlineprotectedvirtual |
Virtual function that should be overridden for derived classes that need to load cells. It is called by gmpNodeMesh::loadPrivateData() to initialize the cell data object for cell meshes, returning the cell data object itself or NULL for node meshes. Gets as parameter the mesh table + an in/out flag that states if the user requested ghost nodes support or not. It may update that flag with the cell mesh requirements, so that a mesh that requires ghost support (like a mesh with support for hierarchical elements), can express so. The ok flag should be set to false if there was any error initializing the data. Notice that a node mesh should return NULL and set ok to true.
Reimplemented in GmpCellMeshBase< Mesh, Vector >, GmpCellMeshBase< GmCellMesh, Vector >, and GmpCellMeshBase< GmElementMesh, Vector >.