GemaCoreLib
The GeMA Core library
Public Types | Public Member Functions | List of all members
GmCellMeshTopology Class Referenceabstract

Base interface class for mesh topological queries. More...

#include <gmCellMeshTopology.h>

Public Types

enum  QueryOptions { STAR, QSTAR }
 Query options for adjacent nodes retrieval. More...
 

Public Member Functions

virtual GmCelladjacentCell (const GmCell *cell, int sideIndex, int *adjSideIndex=NULL) const =0
 Given a cell, returns the adjacent cell sharing the given side, represented by a cell edge index for surface meshes or by a cell face index for solid mehses. More...
 
virtual void nodeAdjacentNodes (int nodeIndex, QueryOptions options, QVector< int > &list) const =0
 Fills list with the set of adjacent nodes to the given node. The result list depends on the given options parameter. More...
 
virtual void nodeAdjacentCells (int nodeIndex, QVector< GmCell * > &list) const =0
 Fills list with all the cells that include the given node.
 
virtual void nodeAdjacentCells (int nodeIndex, QVector< const GmCell * > &list) const =0
 Fills list with all the cells that include the given node. Overload filling a list of const pointers.
 
virtual void edgeAdjacentCells (const GmCell *cell, int edgeIndex, QVector< GmCell * > &list) const =0
 Fills list with all the cells that include the given edge, idetntified by a cell + local edge index pair. The input cell is added to the list. In 2D this is simillar to calling adjacentCell()
 
virtual void edgeAdjacentCells (const GmCell *cell, int edgeIndex, QVector< const GmCell * > &list) const =0
 Overload for edgeAdjacentCells(const GmCell*, int, QVector<GmCell*>&) filling a list of const pointers.
 
virtual bool isBorderNode (int nodeIndex) const =0
 Returns true if this node belongs to an edge/face that does not have an adjacent cell. Returns false otherwise (this includes "nodes belonging only to "strange" elements or not belonging to a cell at all).
 
virtual void printParameters (const GmLogCategory &logger, GmLogLevel level) const =0
 Prints a summary of the topological structure in a way to be integrated with the mesh printed by GmCellMesh::printParameters()
 
virtual void print (const GmLogCategory &logger, GmLogLevel level) const =0
 Prints the topological structure FULL information to the specified logger/level.
 
virtual size_t printMemoryStatistics (const GmLogCategory &logger, GmLogLevel level) const =0
 Prints memory usage for the topological data structure to the given logger. Returns the used memory as reported by usedMemory()
 
virtual size_t usedMemory () const =0
 Returns the approximate memory used for storing the topological data structure.
 

Detailed Description

Base interface class for mesh topological queries.

Member Enumeration Documentation

◆ QueryOptions

Query options for adjacent nodes retrieval.

Enumerator
QSTAR 

Returns the set of connected nodes, ignoring quadratic nodes.

Member Function Documentation

◆ adjacentCell()

virtual GmCell* GmCellMeshTopology::adjacentCell ( const GmCell cell,
int  sideIndex,
int *  adjSideIndex = NULL 
) const
pure virtual

Given a cell, returns the adjacent cell sharing the given side, represented by a cell edge index for surface meshes or by a cell face index for solid mehses.

The sideIndex is a value between 0 and the number of element edges/face - 1, defining the position of the edge/face of interest in the cell. Returns NULL if the edge/face belongs to the mesh boundary. Also returns NULL for "strange" elements that don't have topology information (non-manifold elements like bars for a surface mesh and bars, quads and triangles for solid meshes).

If adjSideIndex is different from NULL, it will be filled with the side index of the adjacent edge/face in the adjacent cell.

◆ nodeAdjacentNodes()

virtual void GmCellMeshTopology::nodeAdjacentNodes ( int  nodeIndex,
QueryOptions  options,
QVector< int > &  list 
) const
pure virtual

Fills list with the set of adjacent nodes to the given node. The result list depends on the given options parameter.

1—10-—2—11-—3 nodeIndex = 5: | | | options = STAR - Returns {2, 4, 8, 6} 12 22 13 23 14 options = QSTAR - Returns {13, 15, 18, 16} | | | 4—15-—5—16-—6 nodeIndex = 15: | | | options = STAR or QSTAR - Returns {4, 5} 17 24 18 25 19 | | | nodeIndex = 22: 7—20-—8—21-—9 options = STAR or QSTART - Returns {}


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