GemaCoreLib
The GeMA Core library
Loading...
Searching...
No Matches
GmGaussIndexProxy< T > Class Template Reference

A helper class that implements a GmGaussIndex interface from a proxy object that includes all the needed functions but DOES NOT inherit from GmGaussIndex (and so does not incur in a virtual function call penalty) More...

#include <gmGaussIndex.h>

Inheritance diagram for GmGaussIndexProxy< T >:
Collaboration diagram for GmGaussIndexProxy< T >:

Public Member Functions

 GmGaussIndexProxy (T *proxy, bool ownership)
 Constructor. Takes ownership of the received object if ownership is true.
 
virtual ~GmGaussIndexProxy ()
 Destructor. Deletes the proxy if we have its ownership.
 
virtual int numPoints () const
 Returns the number of Gauss points in the index.
 
virtual int numCells () const
 Returns the number of cells in the index.
 
virtual int numPoints (int cellId) const
 Returns the number of Gauss points for the given Cell. Returns 0 if the cell does not belongs to the set.
 
virtual int pointIndex (int cellId, int ip) const
 Given a mesh cell index and an integration point index, returns the Gauss point "linear" index, a value between 0 and numPoints()-1. Returns -1 if the the given cellId does not belong to the index set (a cell outside a cell list, for example - cell ids outside the mesh domain are invalid though).
 
virtual int cellIp (int gpIndex, int *ip) const
 Given a Gauss point "linear" index (a value from 0 to numPoints()-1), returns the mesh cell index + its integration point index by filling ip.
 
- Public Member Functions inherited from GmGaussIndex
virtual ~GmGaussIndex ()
 Virtual destructor.
 

Private Attributes

T * _proxy
 The proxy object.
 
bool _ownsProxy
 Do we own the proxy object?
 

Detailed Description

template<class T>
class GmGaussIndexProxy< T >

A helper class that implements a GmGaussIndex interface from a proxy object that includes all the needed functions but DOES NOT inherit from GmGaussIndex (and so does not incur in a virtual function call penalty)

Member Function Documentation

◆ cellIp()

template<class T >
virtual int GmGaussIndexProxy< T >::cellIp ( int gpIndex,
int * ip ) const
inlinevirtual

Given a Gauss point "linear" index (a value from 0 to numPoints()-1), returns the mesh cell index + its integration point index by filling ip.

Implements GmGaussIndex.

◆ numCells()

template<class T >
virtual int GmGaussIndexProxy< T >::numCells ( ) const
inlinevirtual

Returns the number of cells in the index.

Implements GmGaussIndex.

◆ numPoints() [1/2]

template<class T >
virtual int GmGaussIndexProxy< T >::numPoints ( ) const
inlinevirtual

Returns the number of Gauss points in the index.

Implements GmGaussIndex.

◆ numPoints() [2/2]

template<class T >
virtual int GmGaussIndexProxy< T >::numPoints ( int cellId) const
inlinevirtual

Returns the number of Gauss points for the given Cell. Returns 0 if the cell does not belongs to the set.

Implements GmGaussIndex.

◆ pointIndex()

template<class T >
virtual int GmGaussIndexProxy< T >::pointIndex ( int cellId,
int ip ) const
inlinevirtual

Given a mesh cell index and an integration point index, returns the Gauss point "linear" index, a value between 0 and numPoints()-1. Returns -1 if the the given cellId does not belong to the index set (a cell outside a cell list, for example - cell ids outside the mesh domain are invalid though).

Implements GmGaussIndex.


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