GemaCoreLib
The GeMA Core library
Loading...
Searching...
No Matches
GmDiscontinuity Class Referenceabstract

The geometric representation for a single discontinuity from the Discontinuity set. For 2D meshes, it is a polyline. For 3D meshes is a triangulated surface. It can also be represented by edge or face lists. More...

#include <gmDiscontinuity.h>

Inheritance diagram for GmDiscontinuity:
Collaboration diagram for GmDiscontinuity:

Public Member Functions

virtual ~GmDiscontinuity ()
 Virtuald destructor.
 
int index () const
 Returns this discontinuity index in the father set.
 
QString id () const
 Returns the discontinuity id (name)
 
int cellGroupIndex () const
 Returns the cell group index associated with this discontinuity, if any. This is the index of the group in the list returned by GmCellMesh::cellGroupIds() Returns -1 for an unspecified cell group.
 
void setCellGroupIndex (int group)
 
virtual int propertyIndex (int propertySet) const
 Given a property set number, returns the line of the property set that contains property values for this discontinuity. The returned value can be used to get a property from a property accessor retrieved from the discontinuity set.
 
virtual int numElements () const =0
 A generic interface to return the original discontinuity data number of geometric elements. For 2d meshes it will be either the number of polyline segments or the number of edges. For 3d meshes, the number of triangles or the number of faces.
 
virtual int numPoints () const =0
 A generic interface to return the original discontinuity data number of points.
 
virtual int numIntersections () const =0
 A generic interface to return the number of intersections between the mesh and the user given geometry. Is the number of line segments or faces (triangles an/or quads) in the intersection set.
 
virtual bool extendGeometry (GmCellMesh *sMesh, double size, const GmLogCategory &logger)=0
 
virtual void clearGeometry ()=0
 Clears the original discontinuity geometry information, releasing memory.
 
virtual void printGeometry (const GmLogCategory &logger, GmLogLevel level) const =0
 Prints the discontinuity geometry information.
 
virtual size_t usedGeometryMemory () const =0
 Returns an estimative of the memory used by the discontinuity geometry in bytes.
 
virtual bool findIntersections (const GmLogCategory &logger)
 Builds the element intersection list for this discontinuity.
 
virtual void printIntersections (const GmLogCategory &logger, GmLogLevel level) const
 Prints the discontinuity-mesh intersection information.
 
virtual size_t usedIntersectionMemory () const
 Returns an estimative of the memory used by the intersection data in bytes.
 

Protected Member Functions

 GmDiscontinuity (const GmDiscontinuitySet *ds, int index, QString id, int groupIndex, const QVector< int > &psIndex)
 Private constructor. Discontinuities are only created by the DiscontinuitySet.
 
virtual void setGeometry (double *dvec, int nd, int *ivec, int ni)=0
 A function to set the geometry data. See the parameter descriptions on the concrete classes.
 
virtual bool loadGeometryFromTable (LuaTable &tab, const GmLogCategory &logger)=0
 

Static Protected Member Functions

template<class T , class V >
static T * loadIntoVector (LuaTable &tab, V validator, int n, int *realSize, QString discontinuityId, const char *msg, const GmLogCategory &logger)
 Allocate a vector of type T with at most tab.size() * n elements and reads the tab contents into it. Expects that tab is a vector with sub-tables storing n elements. Each loaded element is passed as a variant to the validator function, that should return the converted value to T. The validator should also fill a status variable that says if the value is ok (>=0), ignored (-1) or invalid(-2). Invalid values raise an error and causes loadIntoVector() to log a message and return NULL. Ignored values are simply not added to the result vector (which will be resized accordingly) and are targeted into ignoring cells that don't belong to the current mesh partition. Returns the real size of the vector in the realSize output parameter.
 

Protected Attributes

const GmDiscontinuitySet_ds
 Our "father" discontinuity set.
 
int _index
 The discontinuity index in its "father" discontinuity set.
 
QString _id
 The discontinuity id.
 
int _groupIndex
 The index in the mesh for the associated cell group or -1 if there is none.
 
QVector< int > _psIndex
 The property set line index for this discontinuity. One entry per associated property set.
 

Private Member Functions

 Q_DISABLE_COPY (GmDiscontinuity)
 

Friends

class GmDiscontinuitySet
 

Detailed Description

The geometric representation for a single discontinuity from the Discontinuity set. For 2D meshes, it is a polyline. For 3D meshes is a triangulated surface. It can also be represented by edge or face lists.

Member Function Documentation

◆ clearGeometry()

virtual void GmDiscontinuity::clearGeometry ( )
pure virtual

Clears the original discontinuity geometry information, releasing memory.

Implemented in GmEdgeListDiscontinuity, GmFaceListDiscontinuity, GmPolylineDiscontinuity, and GmTriSurfaceDiscontinuity.

◆ extendGeometry()

virtual bool GmDiscontinuity::extendGeometry ( GmCellMesh * sMesh,
double size,
const GmLogCategory & logger )
pure virtual

\breif A generic interface for extending the original geometry by size units. The 'sMesh' is a empty mesh that supports addition of elements and topological consults.

Implemented in GmEdgeListDiscontinuity, GmFaceListDiscontinuity, GmPolylineDiscontinuity, and GmTriSurfaceDiscontinuity.

◆ findIntersections()

virtual bool GmDiscontinuity::findIntersections ( const GmLogCategory & logger)
inlinevirtual

Builds the element intersection list for this discontinuity.

Reimplemented in GmPolylineDiscontinuity, and GmTriSurfaceDiscontinuity.

◆ numElements()

virtual int GmDiscontinuity::numElements ( ) const
pure virtual

A generic interface to return the original discontinuity data number of geometric elements. For 2d meshes it will be either the number of polyline segments or the number of edges. For 3d meshes, the number of triangles or the number of faces.

Implemented in GmEdgeListDiscontinuity, GmFaceListDiscontinuity, GmPolylineDiscontinuity, and GmTriSurfaceDiscontinuity.

◆ numIntersections()

virtual int GmDiscontinuity::numIntersections ( ) const
pure virtual

A generic interface to return the number of intersections between the mesh and the user given geometry. Is the number of line segments or faces (triangles an/or quads) in the intersection set.

Implemented in GmEdgeListDiscontinuity, GmFaceListDiscontinuity, GmPolylineDiscontinuity, and GmTriSurfaceDiscontinuity.

◆ numPoints()

virtual int GmDiscontinuity::numPoints ( ) const
pure virtual

A generic interface to return the original discontinuity data number of points.

Implemented in GmEdgeListDiscontinuity, GmFaceListDiscontinuity, GmPolylineDiscontinuity, and GmTriSurfaceDiscontinuity.

◆ printGeometry()

virtual void GmDiscontinuity::printGeometry ( const GmLogCategory & logger,
GmLogLevel level ) const
pure virtual

Prints the discontinuity geometry information.

Implemented in GmEdgeListDiscontinuity, GmFaceListDiscontinuity, GmPolylineDiscontinuity, and GmTriSurfaceDiscontinuity.

◆ printIntersections()

virtual void GmDiscontinuity::printIntersections ( const GmLogCategory & logger,
GmLogLevel level ) const
inlinevirtual

Prints the discontinuity-mesh intersection information.

Reimplemented in GmPolylineDiscontinuity, and GmTriSurfaceDiscontinuity.

◆ propertyIndex()

virtual int GmDiscontinuity::propertyIndex ( int propertySet) const
inlinevirtual

Given a property set number, returns the line of the property set that contains property values for this discontinuity. The returned value can be used to get a property from a property accessor retrieved from the discontinuity set.

The propertySet number is local to the discontinuity set and varies between 0 and GmDiscontinuitySet::numPropertySets() - 1.

◆ setGeometry()

virtual void GmDiscontinuity::setGeometry ( double * dvec,
int nd,
int * ivec,
int ni )
protectedpure virtual

A function to set the geometry data. See the parameter descriptions on the concrete classes.

Implemented in GmEdgeListDiscontinuity, GmFaceListDiscontinuity, GmPolylineDiscontinuity, and GmTriSurfaceDiscontinuity.

◆ usedGeometryMemory()

virtual size_t GmDiscontinuity::usedGeometryMemory ( ) const
pure virtual

Returns an estimative of the memory used by the discontinuity geometry in bytes.

It returns in general the variable memory that depends on the number of lines in a polyline, edges or faces for boundary lists or points & triangles for surfaces, ignoring "constant" sizes.

Implemented in GmEdgeListDiscontinuity, GmFaceListDiscontinuity, GmPolylineDiscontinuity, and GmTriSurfaceDiscontinuity.

◆ usedIntersectionMemory()

virtual size_t GmDiscontinuity::usedIntersectionMemory ( ) const
inlinevirtual

Returns an estimative of the memory used by the intersection data in bytes.

Reimplemented in GmPolylineDiscontinuity, and GmTriSurfaceDiscontinuity.


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