24 #ifndef _GEMA_XFEM_INTRULE_H_ 25 #define _GEMA_XFEM_INTRULE_H_ 49 virtual bool isValid()
const {
return numPoints() > 0; }
52 virtual int numPoints()
const {
return _ipList.
count(); }
54 virtual void integrationPoint(
int index,
GmVector& naturalCoord,
double* weight)
const;
60 virtual int numNaturalCoord()
const {
return _ncoord; }
63 virtual int degree()
const {
return 0; }
75 virtual int rulePar(
int num)
const { Q_UNUSED(num);
return -1; }
78 virtual int ruleParNumPoints(
int num)
const { Q_UNUSED(num);
return -1; }
94 int nextCacheKey()
const {
static int globalXfemIrId = 0;
return globalXfemIrId++; }
int _internalId
An unique internal id used as cache key for Xfem integration rules.
Definition: xfemIntegrationRule.h:100
virtual QString ruleName() const
Returns the current ruleName adopted by this integration rule. Always returns "xfem".
Definition: xfemIntegrationRule.h:69
void setIntegrationPoints(int firstIndex, GmCellType type, GmCellType seType, const GmMatrix &seNaturalCoords, const GmIntegrationRule *seIr, int subElement)
Updates the set of integration points corresponding to the default integration points of a sub elemen...
Definition: xfemIntegrationRule.cpp:284
virtual bool isValid() const
Returns true if this is a valid integration rule object, false if not.
Definition: xfemIntegrationRule.h:49
virtual int degree() const
Returns the integration degree for this rule. Always returns 0.
Definition: xfemIntegrationRule.h:63
void fillSubelementIntegrationPoint(GmCellType type, GmCellType seType, const GmShape *seShape, const GmMatrix &seNaturalCoords, const GmIntegrationRule *seIr, int ipIndex, QPair< GmVector, double > &ipData)
Auxiliary function used by addIntegrationPoints() and setIntegrationPoints() to compute the position ...
Definition: xfemIntegrationRule.cpp:322
int _ncoord
The number of coordinates in each integration point.
Definition: xfemIntegrationRule.h:101
void addIntegrationPoints(GmCellType type, GmCellType seType, const GmMatrix &seNaturalCoords, const GmIntegrationRule *seIr, int subElement)
Adds a set of integration points corresponding to the default integration points of a sub element of ...
Definition: xfemIntegrationRule.cpp:218
virtual int subElement(int index) const
Returns the sub-element number that contains the given integration point.
Definition: xfemIntegrationRule.h:57
void addIntegrationPoint(const GmVector &naturalCoord, double weight, int subElement)
Adds a new integration point to the rule.
Definition: xfemIntegrationRule.cpp:151
void setIntegrationPoint(int index, const GmVector &naturalCoord, double weight, int subElement)
Updates the value, weight and sub-element of an existing integration point.
Definition: xfemIntegrationRule.cpp:134
Basic class for a XFEM mesh. This is the basic mesh interface for xfem problems adding enrichment cap...
Definition: xfemMesh.h:49
QVector< QPair< GmVector, double > > _ipList
The list of integration points and their weights.
Definition: xfemIntegrationRule.h:102
int nextCacheKey() const
Returns the next available cache key.
Definition: xfemIntegrationRule.h:94
virtual ~XfemIntegrationRule()
Destructor.
Definition: xfemIntegrationRule.cpp:71
A special integration rule for handling refined xfem elements.
Definition: xfemIntegrationRule.h:37
XfemIntegrationRule(int ncoord, int npoints=0)
Builds an integration rule that returns integration points with the specified number of natural coord...
Definition: xfemIntegrationRule.cpp:49
void clearPoints()
Removes all registered integration points from the rule, making it into an invalid rule.
Definition: xfemIntegrationRule.cpp:90
QVector< int > _subElemList
A list storing the subelement that each ip belongs to.
Definition: xfemIntegrationRule.h:103
const T & at(int i) const const
void removeIntegrationPoints(int firstIndex, int num, int seOffset)
Removes the given range of integration points from the list.
Definition: xfemIntegrationRule.cpp:170
void setNumPoints(int npoints)
Adjust the number of integration points to the requested number, adding new entries if necessary....
Definition: xfemIntegrationRule.cpp:103
int count(const T &value) const const