GemaMesh
The GeMA Mesh Plugin
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Static Protected Attributes | List of all members
GmpCellMeshDataBase Struct Reference

A non template base class for GmpCellMeshData storing the needed static attributes and controlling the global mesh set and hierarchical cell options. More...

#include <gmpCellMeshData.h>

Inheritance diagram for GmpCellMeshDataBase:
Inheritance graph
[legend]
Collaboration diagram for GmpCellMeshDataBase:
Collaboration graph
[legend]

Public Member Functions

 GmpCellMeshDataBase (GmCellMesh *mesh)
 Constructor.
 
virtual ~GmpCellMeshDataBase ()
 Virtual destructor.
 
bool hierarchicalElements () const
 Returns true if the mesh uses hierarchical elements, false otherwise.
 

Static Public Member Functions

static int hierarchicalOrderIndex (int P, int Q)
 Returns the table index that matches the given hierarchical element P & Q orders or -1 if (P, Q) forms a new order and the internal table already includes GmpCellMeshDataMaxHTypes entries. More...
 
static int hierarchicalPOrder (int index)
 Returns the P order for hierarchical elements associated with the given index (returned by hierarchicalOrderIndex()), or 0 if elements are not hierarchical.
 
static int hierarchicalQOrder (int index)
 Returns the Q order for hierarchical elements associated with the given index (returned by hierarchicalOrderIndex()), or 0 if elements are not hierarchical.
 
static int newMeshId (GmCellMesh *mesh, GmpCellMeshDataBase *data)
 Returns the next available mesh id, storing mesh in the mesh table at the returned index. If no room exists for a new mesh, returns -1.
 
static GmCellMeshmesh (int meshId)
 Returns the mesh pointer associated with the given mesh id.
 
static GmpCellMeshDataBasemeshData (int meshId)
 Returns the mesh data pointer associated with the given mesh id.
 

Public Attributes

int _meshId
 Stores the mesh index in _meshTable for the current mesh.
 
int _hierarchicalIndex
 The hierarchical order index in _hTable if this mesh has hierarchical elements or -1 if elements are not hierarchical.
 

Static Public Attributes

static const int maxHTypes = GmpCellMeshDataMaxHTypes
 

Static Protected Attributes

static QPair< int, int > _hTable [GmpCellMeshDataMaxHTypes]
 Table storing the set of used orders for hierarchical elements.
 
static int _hTableNumUsedSlots = 0
 The number of used entries in _hTable. More...
 
static GmCellMesh_meshTable [GMP_GEMAMESH_MAX_NUM_MESHES]
 Table storing the set of created cell meshes. More...
 
static GmpCellMeshDataBase_meshDataTable [GMP_GEMAMESH_MAX_NUM_MESHES]
 Table storing the set of created cell mesh data objects.
 

Detailed Description

A non template base class for GmpCellMeshData storing the needed static attributes and controlling the global mesh set and hierarchical cell options.

Member Function Documentation

◆ hierarchicalOrderIndex()

int GmpCellMeshDataBase::hierarchicalOrderIndex ( int  P,
int  Q 
)
static

Returns the table index that matches the given hierarchical element P & Q orders or -1 if (P, Q) forms a new order and the internal table already includes GmpCellMeshDataMaxHTypes entries.

When working with hierarchical elements, the element's P & Q order are mesh parameters, but to allow an hierarchical element to return the appropriate shape function (parameterised by P & Q) without acces to the mesh, those parameters are added to the element type by using template parameters (so that they do not use space in the element definition). Since P & Q are conceptually any integer numbers, and the templates must be resolved at compile time, it is not feasible to create a template specialization for each possible pair of P & Q. Instead, we store in _hTable the set of used pairs for the whole simulation (keep in mind that each mesh uses only one pair) and add to the cell type only the index of P & Q in the table, limiting the table size.

Member Data Documentation

◆ _hTableNumUsedSlots

int GmpCellMeshDataBase::_hTableNumUsedSlots = 0
staticprotected

The number of used entries in _hTable.

Table storing the set of created cell meshes, associated with their mesh index

◆ _meshTable

GmCellMesh * GmpCellMeshDataBase::_meshTable
staticprotected

Table storing the set of created cell meshes.

Table storing the set of created cell mesh data objects, associated with their mesh index.


The documentation for this struct was generated from the following files: