GemaMesh
The GeMA Mesh Plugin
Loading...
Searching...
No Matches
GmpCellMeshBase< Mesh, Vector > Class Template Referenceabstract

Basic class for implementing a mesh with support for cells. More...

#include <gmpCellMesh.h>

Inheritance diagram for GmpCellMeshBase< Mesh, Vector >:
Collaboration diagram for GmpCellMeshBase< Mesh, Vector >:

Public Member Functions

 GmpCellMeshBase (GmSimulationData *simulation, QString id, QString description, const GmLogCategory &logger)
 Constructor. Will be called by the plugin loading code.
 
virtual ~GmpCellMeshBase ()
 Destructor.
 
virtual bool hasCapability (QString capabilityName) const
 
virtual int numCells () const
 
virtual int numActiveCells () const
 
virtual const GmCellcell (int cellIndex) const
 
virtual GmCellcell (int cellIndex)
 
virtual const GmCellMeshTopologytopology (bool create=true) const
 
virtual void clearTopology ()
 
virtual bool hasSolidElements () const
 
virtual const int * numCellTypes () const
 
virtual const int * numActiveCellTypes () const
 
virtual int maxNumCellNodes () const
 
virtual int maxNumCellGhostNodes () const
 
virtual int maxTotalNumCellNodes () const
 
virtual void ghostNodesUpdated (int nghost, int ntotal)
 
virtual void activeCellUpdated (GmCellType type, bool active)
 
virtual QStringList cellGroupIds () const
 
virtual int numCellsInGroup (int groupIndex) const
 
virtual const GmCellcellInGroup (int groupIndex, int cellIndex) const
 
virtual GmCellcellInGroup (int groupIndex, int cellIndex)
 
virtual int addCellGroup (QString groupName)
 
virtual bool addCellsToGroup (int groupId, const QVector< int > &cellIds)
 
virtual bool addCellsToGroup (int groupId, const QVector< QPair< int, int > > &cellIds)
 
virtual const QMap< QString, GmCellBoundary * > & cellBoundaryGroups () const
 
virtual const QList< GmPropertySet * > & propertySets () const
 
virtual int propertySetIndex (QString id) const
 
virtual int addCells (int *numCellTypes)
 
virtual QList< int > addedCells () const
 
virtual void clearAddedCells ()
 
virtual void emitMeshChanged ()
 
virtual void clear ()
 
virtual GmpCellMeshData< Vector > * cellData ()
 
virtual size_t cellMemory () const
 
virtual size_t cellGroupsMemory () const
 
virtual size_t cellBoundariesMemory () const
 
- Public Member Functions inherited from GmpNodeMesh< Mesh, Vector >
 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 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 GmValueInfonodeCoordInfo () const
 
virtual GmValueAccessornodeCoordAccessor (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 size_t nodeMemory () const
 
virtual size_t nodeSetsMemory () const
 
virtual GmPCRpcrObject () const
 

Protected Member Functions

virtual GmpCellMeshData< Vector > * initCellData (LuaTable &table, bool *ghostSupport, bool *ok)
 Method called by gmpNodeMesh::loadPrivateData() to initialize the cell data object. See the parameter description on the base class (GmpNodeMesh).
 
virtual GmpCellAllocator cellAllocator (bool ghostSupport, bool hSupport) const =0
 Virtual function that should be overridden by derived classes. The ghostSupport parameter defines if ghost nodes support is desired or not. The hSupport is used for specifying if support for hierarchical elements is required (meshes must have eithar "normal" elements or hierarchical elements). If set to true, ghostSupport must also be set to true.
 
virtual int cellSize (bool ghostSupport, bool hSupport) const =0
 Virtual function that should be overridden by derived classes to specify the concrete "sizeof" of the structure returned by the cellAllocator.
 
virtual bool addStateGeometryData (GmStateDump *state, int groupId)
 
virtual bool fillDumpControlMapData (QVariantMap *map, const GmLogCategory &logger)
 
virtual bool dumpControlMapDataLoaded (QVariantMap *map, const GmLogCategory &logger)
 
- Protected Member Functions inherited from GmpNodeMesh< Mesh, Vector >
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 ()
 

Protected Attributes

GmpCellMeshData< Vector > _cd
 The complete cell data.
 
int _oldNumCells
 The old number of cells that the mesh had before calls to addCells()
 
- Protected Attributes inherited from GmpNodeMesh< Mesh, Vector >
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)
 

Detailed Description

template<class Mesh, template< class > class Vector>
class GmpCellMeshBase< Mesh, Vector >

Basic class for implementing a mesh with support for cells.

See comments on GmpNodeMesh for a basic rational for why this is a template class. The Mesh parameter should be a mesh class while Vector can be either GmSingleVector or GmDualVector.

Does not implement the needed virtual functions that are specific for a CellMesh / ElementMesh / XfemMesh. Those are delegated to subclasses of GmpCellMeshBase.

Member Function Documentation

◆ addStateGeometryData()

template<class Mesh , template< class > class Vector>
virtual bool GmpCellMeshBase< Mesh, Vector >::addStateGeometryData ( GmStateDump * state,
int groupId )
inlineprotectedvirtual

Reimplemented from GmpNodeMesh< Mesh, Vector >.

◆ cellAllocator()

template<class Mesh , template< class > class Vector>
virtual GmpCellAllocator GmpCellMeshBase< Mesh, Vector >::cellAllocator ( bool ghostSupport,
bool hSupport ) const
protectedpure virtual

Virtual function that should be overridden by derived classes. The ghostSupport parameter defines if ghost nodes support is desired or not. The hSupport is used for specifying if support for hierarchical elements is required (meshes must have eithar "normal" elements or hierarchical elements). If set to true, ghostSupport must also be set to true.

Implemented in GmpCellMesh< Vector >, and GmpElementMesh< Vector >.

◆ cellSize()

template<class Mesh , template< class > class Vector>
virtual int GmpCellMeshBase< Mesh, Vector >::cellSize ( bool ghostSupport,
bool hSupport ) const
protectedpure virtual

Virtual function that should be overridden by derived classes to specify the concrete "sizeof" of the structure returned by the cellAllocator.

Implemented in GmpCellMesh< Vector >, and GmpElementMesh< Vector >.

◆ clear()

template<class Mesh , template< class > class Vector>
virtual void GmpCellMeshBase< Mesh, Vector >::clear ( )
inlinevirtual

Reimplemented from GmpNodeMesh< Mesh, Vector >.

◆ dumpControlMapDataLoaded()

template<class Mesh , template< class > class Vector>
virtual bool GmpCellMeshBase< Mesh, Vector >::dumpControlMapDataLoaded ( QVariantMap * map,
const GmLogCategory & logger )
inlineprotectedvirtual

Reimplemented from GmpNodeMesh< Mesh, Vector >.

◆ fillDumpControlMapData()

template<class Mesh , template< class > class Vector>
virtual bool GmpCellMeshBase< Mesh, Vector >::fillDumpControlMapData ( QVariantMap * map,
const GmLogCategory & logger )
inlineprotectedvirtual

Reimplemented from GmpNodeMesh< Mesh, Vector >.

◆ hasCapability()

template<class Mesh , template< class > class Vector>
virtual bool GmpCellMeshBase< Mesh, Vector >::hasCapability ( QString capabilityName) const
inlinevirtual

Reimplemented from GmpNodeMesh< Mesh, Vector >.

◆ initCellData()

template<class Mesh , template< class > class Vector>
virtual GmpCellMeshData< Vector > * GmpCellMeshBase< Mesh, Vector >::initCellData ( LuaTable & table,
bool * ghostSupport,
bool * ok )
inlineprotectedvirtual

Method called by gmpNodeMesh::loadPrivateData() to initialize the cell data object. See the parameter description on the base class (GmpNodeMesh).

Reimplemented from GmpNodeMesh< Mesh, Vector >.


The documentation for this class was generated from the following file: