GemaCoreLib
The GeMA Core library
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
GmProxyBorderIntegrationRule Class Reference

Common code for border integration rules based on a given integration rule that is used to implement most of the border interface methods. More...

#include <gmBorderIntegrationRule.h>

Inheritance diagram for GmProxyBorderIntegrationRule:
Inheritance graph
[legend]
Collaboration diagram for GmProxyBorderIntegrationRule:
Collaboration graph
[legend]

Public Member Functions

virtual ~GmProxyBorderIntegrationRule ()
 Destructor.
 
bool isValid () const
 Returns true if this is a valid integration rule object, false if not. More...
 
virtual int numPoints () const
 Returns the number of integration points returned by this rule.
 
virtual void integrationPoint (int index, GmVector &naturalCoord, double *weight) const
 Given an index from 0 to numPoints() - 1, fills naturalCoord and weight with the position and weigth of the given integration point. More...
 
virtual int numNaturalCoord () const
 Returns the number of natural coordinates used by this integration rule.
 
virtual int degree () const
 Returns the integration degree for this rule (The polynomial degree for which this rule is exact)
 
virtual GmIntegrationRuleType ruleType () const
 Returns the type of the integration rule.
 
virtual QString ruleName () const
 Returns the current ruleName adopted by this integration rule.
 
virtual int rulePar (int num) const
 Returns the value of the numbered rule parameter received in the rule constructor (-1 if unused). Num should be a value between 1 and 3.
 
virtual int ruleParNumPoints (int num) const
 
virtual int cacheKey () const
 Returns an unique integer that can be used to uniquelly represent this kind of integration rule (i.e, two objects with the same cache key should return exactly the same set of integration points). More...
 
virtual int numBorderCoord () const
 Returns the number of expected coordinates in a border coordinate.
 
virtual bool translatePoint (int border, const GmVector &borderCoord, GmVector &elementCoord) const
 Given an integration point calculated with the border rule, by a call to integrationPoint(), whose returned coordinate uses the border reference (edge or face), and so has less coordinates than the element coordinate system, returns a new point in the element reference system, filling the original set of coordinates with the missing, fixed, values assciated with a border. More...
 
- Public Member Functions inherited from GmIntegrationRule
virtual ~GmIntegrationRule ()
 Virtual destructor.
 
virtual const QVector< int > & closestIntegrationIndex (GmCellType type, int P, int Q, int nodeIndex) const
 Returns a list with the index of the closest(s) integraion points from nodeIndex. More...
 

Protected Member Functions

 GmProxyBorderIntegrationRule (GmCellType type, int nnatural, GmIntegrationRule *ir, bool face)
 Constructor. Receives the element type for which we are tied to (the element type, not the border type), the number of expected natural coordinates for the element (might be different from _shape->numNaturalCoord() for interface elements), the wrapped border integration rule and a boolean stating if the rule is for a face or an edge.
 
- Protected Member Functions inherited from GmIntegrationRule
int makeCacheKey (GmIntegrationRuleCacheKeyBase base, bool closed, int rule1, int rule2=-1, int rule3=-1) const
 Creates an unique cache key based on the rule type cache key and the rule parameters.
 
QString makeRuleName (GmIntegrationRuleType irType, int rule1, int rule2=-1, int rule3=-1) const
 Returns a standard rule name based on rule type and rule parameters.
 

Protected Attributes

GmIntegrationRule_rule
 The basic wrapped integration rule.
 
const GmShape_shape
 The shape function of the element type associated with this rule.
 
int _nnatural
 The number of natural coordinates for the rule. Might be different from _shape->numNaturalCoord() for interface elements.
 
bool _face
 Is this a face or an edge border integration rule?
 

Additional Inherited Members

- Static Public Member Functions inherited from GmBorderIntegrationRule
static GmBorderIntegrationRulefaceInstance (GmCellType type, int P, int Q, int faceType, GmIntegrationRuleType irType, int rule1=-1, int rule2=-1)
 Instanciates a face integration rule for the specified element type using the provided parameters. Returns NULL if the parameter set results in an invalid integration rule. More...
 
static GmBorderIntegrationRuleedgeInstance (GmCellType type, int P, int Q, GmIntegrationRuleType irType, int rule1=-1)
 Instanciates an edge integration rule for the specified element type using the provided parameters. Returns NULL if the parameter set results in an invalid integration rule. More...
 
- Static Public Member Functions inherited from GmIntegrationRule
static GmIntegrationRuleinstance (GmCellType type, int P, int Q, GmIntegrationRuleType irType, int rule1=-1, int rule2=-1, int rule3=-1)
 Instanciates an integration rule for the specified element type using the provided parameters. Returns NULL if the parameter set results in an invalid integration rule. More...
 

Detailed Description

Common code for border integration rules based on a given integration rule that is used to implement most of the border interface methods.

Member Function Documentation

◆ cacheKey()

virtual int GmProxyBorderIntegrationRule::cacheKey ( ) const
inlinevirtual

Returns an unique integer that can be used to uniquelly represent this kind of integration rule (i.e, two objects with the same cache key should return exactly the same set of integration points).

The returned value is used together with an element type as a cache key in closestIntegrationIndex() and in GmShape::gaussExtrapolationMatrix().

Implements GmIntegrationRule.

◆ integrationPoint()

virtual void GmProxyBorderIntegrationRule::integrationPoint ( int  index,
GmVector naturalCoord,
double *  weight 
) const
inlinevirtual

Given an index from 0 to numPoints() - 1, fills naturalCoord and weight with the position and weigth of the given integration point.

After filled, naturalCoord will be a vector with size equal to numNaturalCoord(), which should be equal to the number of natural coordinates of the shape function of the element that this rule will be tied to.

Implements GmIntegrationRule.

◆ isValid()

bool GmProxyBorderIntegrationRule::isValid ( ) const
inlinevirtual

Returns true if this is a valid integration rule object, false if not.

An invalid object can be created when an invalid rule number is passed to the constructor of an integration rule. The result of calling a method other then isValid() over an invalid integration rule is undefined.

Implements GmIntegrationRule.

◆ ruleParNumPoints()

virtual int GmProxyBorderIntegrationRule::ruleParNumPoints ( int  num) const
inlinevirtual

Returns the number of integration points associated with the given rule parameter. This is usefull for compound rules to access the number of points in each "dimension". For non compound rules, returns the number of points. Keep in mind that following the rulePar way, it returns -1 for a unknown parameter. In a 2 x 3 quad rule, for example, it should return 2 for parameter 0 and 3 for parameter 1. This method is necessary since for Newton Coates rules for tri/tet elements the number of points is NOT equal to the parameter and when combined in a Wedge this information is necessary.

Implements GmIntegrationRule.

◆ translatePoint()

bool GmProxyBorderIntegrationRule::translatePoint ( int  border,
const GmVector borderCoord,
GmVector elementCoord 
) const
virtual

Given an integration point calculated with the border rule, by a call to integrationPoint(), whose returned coordinate uses the border reference (edge or face), and so has less coordinates than the element coordinate system, returns a new point in the element reference system, filling the original set of coordinates with the missing, fixed, values assciated with a border.

Parameters
borderThe number of the edge or face associated with the current element where the integration takes place.
borderCoordThe border integration point coordinate returned by the call to integrationPoint().
elementCoordThe vector to be filled with element coordinates equivalent to borderCoord. After filled, elementCoord will be a vector with size equal to numNaturalCoord(), which should be equal to the number of natural coordinates of the shape function of the element that this rule will be tied to. If necessary, this function also should make sure that the domain of the natural coordinate returned is compatible with the element's shape function.
Returns
Returns true on success or false if the given border shoiuld NOT be used for integration (like the 0 length edge for a closed 2d interface element)

Implements GmBorderIntegrationRule.


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