GemaMesh
The GeMA Mesh Plugin
Loading...
Searching...
No Matches
GmpGhostCell< Base, Proxy, CellMeshData, T, N > Class Template Reference

Adds ghost node support to GmpCell. More...

#include <gmpCell.h>

Inheritance diagram for GmpGhostCell< Base, Proxy, CellMeshData, T, N >:
Collaboration diagram for GmpGhostCell< Base, Proxy, CellMeshData, T, N >:

Public Member Functions

 GmpGhostCell (int meshId, int cellId, int offset)
 Constructs a cell given its id, associated mesh id and node offset in the mesh data structure.
 
virtual int numGhostNodes () const
 
virtual int addGhostNode (int globalIndex)
 
virtual void setGhostNodes (int *ghostNodes, int numNodes)
 
virtual void removeGhostNode (int localIndex)
 
virtual int nodeIndex (int localIndex) const
 
virtual void nodes (int *nodeList, bool ghost) const
 
void replaceGhostNodes (int *ghostNodes, int numNodes)
 Replaces the full set of ghost nodes of the cell. Unlike setGhostNodes(), does NOT calls GmCellMesh::ghostNodesUpdated().
 
- Public Member Functions inherited from GmpCell< Base, Proxy, CellMeshData, T, N >
 GmpCell (int meshId, int cellId, int offset)
 Constructs a cell given its id, associated mesh id and node offset in the mesh data structure.
 
virtual int cellId () const
 
virtual GmCellMeshmesh () const
 
virtual bool active () const
 
virtual void setActive (bool active)
 
virtual void pushProxy (lua_State *L, const GmLogCategory &logger)
 
virtual GmCellType type () const
 
virtual int numNodes () const
 
virtual bool setNodes (const int *nodeList)
 
virtual int propertyIndex (int propertySet) const
 
virtual bool setProperties (const int *propList, int nprop)
 
void replaceCellId (int id, bool keepActiveFlag)
 Updates the cell id. For those who really know what they are doing. This function is a very specific function that should not be called lightly. It exists on behalf of the state dumping code and for helping other mesh implementations wishing to encode extra information on the cell id, like the XFem plugin that uses it to mark a cell as enriched or not.
 
int offset () const
 Returns the offset in the global mesh cell nodes vector for this cell. Not part of the GmCell API and should NOT be marked as virtual.
 
void setOffset (int offset)
 Updates the cell offset. Not part of the GmCell API and should NOT be marked as virtual.
 

Protected Attributes

GmPODVector< int, uint32_t, GmPODVectorFastGrow< uint32_t > > _ghostList
 List storing cell ghost nodes. Uses a GmPODVector with size control based on a 32 bits value giving a 16 byte structure. (QVarLengthArray also does that but has the fixed part overhead and no overflow check).
 
- Protected Attributes inherited from GmpCell< Base, Proxy, CellMeshData, T, N >
int _cellId
 The cell index inside the mesh. MSB is used to control if the cell is active or not.
 
int _nodeOffset
 Index in the mesh data for the first node for this cell.
 

Friends

template<template< class > class Vector>
class GmpCellMeshData
 

Additional Inherited Members

- Protected Member Functions inherited from GmpCell< Base, Proxy, CellMeshData, T, N >
CellMeshData * meshData () const
 Returns the mesh data object associated with this cell's mesh.
 

Detailed Description

template<class Base, class Proxy, class CellMeshData, GmCellType T, int N>
class GmpGhostCell< Base, Proxy, CellMeshData, T, N >

Adds ghost node support to GmpCell.

Member Function Documentation

◆ nodeIndex()

template<class Base , class Proxy , class CellMeshData , GmCellType T, int N>
virtual int GmpGhostCell< Base, Proxy, CellMeshData, T, N >::nodeIndex ( int localIndex) const
inlinevirtual

◆ nodes()

template<class Base , class Proxy , class CellMeshData , GmCellType T, int N>
virtual void GmpGhostCell< Base, Proxy, CellMeshData, T, N >::nodes ( int * nodeList,
bool ghost ) const
inlinevirtual

◆ replaceGhostNodes()

template<class Base , class Proxy , class CellMeshData , GmCellType T, int N>
void GmpGhostCell< Base, Proxy, CellMeshData, T, N >::replaceGhostNodes ( int * ghostNodes,
int numNodes )
inline

Replaces the full set of ghost nodes of the cell. Unlike setGhostNodes(), does NOT calls GmCellMesh::ghostNodesUpdated().

Not part of the GmCell API and should NOT be marked as virtual.

Member Data Documentation

◆ _ghostList

template<class Base , class Proxy , class CellMeshData , GmCellType T, int N>
GmPODVector<int, uint32_t, GmPODVectorFastGrow<uint32_t> > GmpGhostCell< Base, Proxy, CellMeshData, T, N >::_ghostList
protected

List storing cell ghost nodes. Uses a GmPODVector with size control based on a 32 bits value giving a 16 byte structure. (QVarLengthArray also does that but has the fixed part overhead and no overflow check).

IMPORTANT1: Using a 16 bytes control with PODVector does not reduce the structure size to 12 bytes due to the required alignment. IMPORTANT2: We use the fast growing algorithm since the number of ghost nodes per cell tend to be really small. IMPORTANT3: If changing the definition below in ANY way, you will also NEED to change the code in GmpCellMeshData::cellMemory(). The two are HIGHLY coupled.


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