GemaCoreLib
The GeMA Core library
Loading...
Searching...
No Matches
gmCellMeshTopology.h
Go to the documentation of this file.
1/************************************************************************
2**
3** Copyright (C) 2014 by Carlos Augusto Teixera Mendes
4** All rights reserved.
5**
6** This file is part of the "GeMA" software. It's use should respect
7** the terms in the license agreement that can be found together
8** with this source code.
9** It is provided AS IS, with NO WARRANTY OF ANY KIND,
10** INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR
11** A PARTICULAR PURPOSE.
12**
13************************************************************************/
14
24#ifndef _GEMA_CELL_MESH_TOPOLOGY_H_
25#define _GEMA_CELL_MESH_TOPOLOGY_H_
26
27#include "gmLog.h"
28
29class GmCell;
30
33{
34public:
35
38 {
39 STAR,
41 };
42
47 virtual bool hasElementsWithoutTopology() const = 0;
48
62 virtual GmCell* adjacentCell(const GmCell* cell, int sideIndex, int* adjSideIndex = NULL) const = 0;
63
77 virtual void nodeAdjacentNodes(int nodeIndex, QueryOptions options, QVector<int>& list) const = 0;
78
80 virtual void nodeAdjacentCells(int nodeIndex, QVector<GmCell*>& list) const = 0;
81
83 virtual void nodeAdjacentCells(int nodeIndex, QVector<const GmCell*>& list) const = 0;
84
89 virtual void edgeAdjacentCells(const GmCell* cell, int edgeIndex, QVector<GmCell*>& list) const = 0;
90
92 virtual void edgeAdjacentCells(const GmCell* cell, int edgeIndex, QVector<const GmCell*>& list) const = 0;
93
98 virtual void edgeAdjacentCells(int node1, int node2, QVector<GmCell*>& list) const = 0;
99
101 virtual void edgeAdjacentCells(int node1, int node2, QVector<const GmCell*>& list) const = 0;
102
108 virtual bool isBorderNode(int nodeIndex) const = 0;
109
111 virtual int numBorders() const = 0;
112
119 virtual int borderIndex(const GmCell* cell, int sideIndex) const = 0;
120
132 virtual GmCell* firstBorderCurveEdge(int borderCurveIndex, int* edgeIndex) const = 0;
133
142 virtual GmCell* nextBorderCurveEdge(const GmCell* cell, int edgeIndex, int* nextEdgeIndex) const = 0;
143
149 virtual void* borderTraverseStart(int borderId) const = 0;
150
155 virtual GmCell* borderTraverseNext(void* context, int* nextSideIndex) const = 0;
156
158 virtual void borderTraverseEnd(void* context) const = 0;
159
161 virtual void printParameters(const GmLogCategory& logger, GmLogLevel level) const = 0;
162
164 virtual void print(const GmLogCategory& logger, GmLogLevel level) const = 0;
165
167 virtual size_t printMemoryStatistics(const GmLogCategory& logger, GmLogLevel level) const = 0;
168
170 virtual size_t usedMemory() const = 0;
171};
172
173#endif
174
Base interface for mesh cells.
Definition gmCell.h:88
Base interface class for mesh topological queries.
Definition gmCellMeshTopology.h:33
virtual void print(const GmLogCategory &logger, GmLogLevel level) const =0
Prints the topological structure FULL information to the specified logger/level.
virtual void edgeAdjacentCells(int node1, int node2, QVector< const GmCell * > &list) const =0
Overload for edgeAdjacentCells(int, int, QVector<GmCell*>&) filling a list of const pointers.
virtual GmCell * borderTraverseNext(void *context, int *nextSideIndex) const =0
Returns the next cell, side pair on the border. context should be the pointer returned by borderTrave...
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 pointer...
virtual GmCell * nextBorderCurveEdge(const GmCell *cell, int edgeIndex, int *nextEdgeIndex) const =0
Given a cell edge belonging to a border from a surface mesh, returns the next edge in the border....
virtual void edgeAdjacentCells(const GmCell *cell, int edgeIndex, QVector< GmCell * > &list) const =0
Fills list with all the cells that include the given edge, identified by a cell + local edge index pa...
virtual size_t usedMemory() const =0
Returns the approximate memory used for storing the topological data structure.
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 GmCe...
virtual void borderTraverseEnd(void *context) const =0
Destroys the context returned by borderTraverseStart()
QueryOptions
Query options for adjacent nodes retrieval.
Definition gmCellMeshTopology.h:38
@ QSTAR
Returns the set of connected nodes, ignoring quadratic nodes.
Definition gmCellMeshTopology.h:40
virtual GmCell * adjacentCell(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 ...
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 a...
virtual void edgeAdjacentCells(int node1, int node2, QVector< GmCell * > &list) const =0
Fills list with all the cells that include the given edge, identified by a pair of nodes....
virtual int numBorders() const =0
Returns the number of border curves / surfaces for a mesh.
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 opt...
virtual bool isBorderNode(int nodeIndex) const =0
Returns true if this node belongs to an edge/face that does not have an adjacent cell....
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 nodeAdjacentCells(int nodeIndex, QVector< GmCell * > &list) const =0
Fills list with all the cells that include the given node.
virtual bool hasElementsWithoutTopology() const =0
Returns true if this mesh contains elements that have no topology information (non-manifold elements ...
virtual void * borderTraverseStart(int borderId) const =0
Given a borderId (a value between 0 and numBorders() - 1, that can also be queried through a call to ...
virtual GmCell * firstBorderCurveEdge(int borderCurveIndex, int *edgeIndex) const =0
Given a border curve index, 0 >= index < numBorders(), from a surface mesh, returns a mesh edge belon...
virtual int borderIndex(const GmCell *cell, int sideIndex) const =0
If the given side belongs to the mesh border, returns the border index (a value between 0 and numBord...
Class representing a category with multiple logging levels.
Definition gmLog.h:58
#define GMC_API_EXPORT
Macro for controlling if the class is being exported (GEMA_CORE_LIB defined) or imported (GEMA_CORE_L...
Definition gmCoreConfig.h:35
Declaration of support functions and macros for information logging.
GmLogLevel
Available log levels list.
Definition gmLog.h:36