![]() |
GemaCoreLib
The GeMA Core library
|
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>
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... | |
![]() | |
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. | |
![]() | |
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 GmBorderIntegrationRule * | faceInstance (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 GmBorderIntegrationRule * | edgeInstance (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 GmIntegrationRule * | instance (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... | |
Common code for border integration rules based on a given integration rule that is used to implement most of the border interface methods.
|
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.
|
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.
|
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.
|
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.
|
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.
border | The number of the edge or face associated with the current element where the integration takes place. |
borderCoord | The border integration point coordinate returned by the call to integrationPoint(). |
elementCoord | The 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. |
Implements GmBorderIntegrationRule.