GemaCoreLib
The GeMA Core library
Public Member Functions | Private Attributes | List of all members
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 incurr in a virtual function call penalty) More...

#include <gmGaussIndex.h>

Inheritance diagram for GmGaussIndexProxy< T >:
Inheritance graph
[legend]
Collaboration diagram for GmGaussIndexProxy< T >:
Collaboration graph
[legend]

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 incurr in a virtual function call penalty)


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