GemaMesh
The GeMA Mesh Plugin
Loading...
Searching...
No Matches
GmpCellMeshDataBase Class Reference

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

#include <gmpCellMeshData.h>

Inheritance diagram for GmpCellMeshDataBase:
Collaboration diagram for GmpCellMeshDataBase:

Public Member Functions

 GmpCellMeshDataBase (GmCellMesh *mesh)
 Constructor.
 
 ~GmpCellMeshDataBase ()
 Destructor. Clears our entry in the global _meshTable and _meshDataTable.
 
bool hierarchicalElements () const
 Returns true if the mesh uses hierarchical elements, false otherwise.
 
bool setHierarchicalIndex (int p, int q)
 Sets the hierarchical index for this mesh from the given P & Q element orders. Returns false if not possible.
 

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.
 
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
 
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 QPair< int, int > _hTable [GMP_GEMAMESH_MAX_HTYPES]
 Table storing the set of used orders for hierarchical elements.
 
static int _hTableNumUsedSlots = 0
 The number of used entries in _hTable.
 
static GmCellMesh_meshTable [GMP_GEMAMESH_MAX_NUM_MESHES]
 Table storing the set of created cell meshes.
 
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 to controll 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 (parameterized by P & Q) without access 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.

◆ meshData()

static GmpCellMeshDataBase * GmpCellMeshDataBase::meshData ( int meshId)
inlinestatic

Returns the mesh data pointer associated with the given mesh id.

Stores the mesh index in _meshTable for the current mesh

Member Data Documentation

◆ _hTableNumUsedSlots

int GmpCellMeshDataBase::_hTableNumUsedSlots = 0
static

The number of used entries in _hTable.

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

◆ _meshTable

GmCellMesh * GmpCellMeshDataBase::_meshTable
static

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 class was generated from the following files: