43 #include <lifev/core/LifeV.hpp> 45 #include <lifev/core/mesh/ElementShapes.hpp> 47 #include <lifev/core/fem/QuadraturePoint.hpp> 180 friend std::ostream& operator << ( std::ostream& c,
const QuadratureRule& qr );
200 M_pt.push_back (QuadraturePoint (qp, M_dimension) );
205 void showMe ( std::ostream& output = std::cout)
const;
227 void vtkExport (
const std::string& filename)
const;
230 template <
typename QRType>
231 void import (
const QRType& qr);
244 void setPoints (
const std::vector<QuadraturePoint>& pts);
258 void setPoints (
const std::vector<GeoVector>& coordinates,
const std::vector<Real>& weights);
261 void setName (
const std::string& newName);
287 return M_pt[ ig ].weight();
294 return M_pt[ ig ].coor ( icoor );
301 return M_pt[ ig ].coor( );
311 const std::string&
name()
const 365 template<
typename QRType>
369 for (
UInt i (0); i < qr.nbQuadPt(); ++i)
371 M_pt.push_back (qr.quadPoint (i) );
UInt M_degOfExact
degree of exactness
const QuadratureRule quadRuleTetra64pt(pt_tetra_64pt, 6, "Quadrature rule 64 points on a tetraedra", TETRA, 64, 7)
const Real & weight(const UInt &ig) const
weight(ig) is the ig-th quadrature weight
void addPoint(const QuadraturePoint &qp)
Method to add a point to an existing quadrature rule.
const QuadratureRule quadRuleQuad16pt(pt_quad_16pt, 4, "Quadrature rule 16 points on a quadrangle", QUAD, 16, 5)
const QuadratureRule quadRuleDummy(pt_node_0pt, QUAD_RULE_DUMMY, "Dummy quadrature rule", NONE, 0, 0)
const QuadratureRule quadRuleQuad4pt(pt_quad_4pt, 2, "Quadrature rule 4 points on a quadrangle", QUAD, 4, 3)
const QuadratureRule quadRuleSeg3pt(pt_seg_3pt, QUAD_RULE_SEG_3PT, "Gauss Legendre 3 points on a segment", LINE, 3, 5)
const QuadratureRule quadRuleTetra4ptNodal(pt_tetra_4pt_nodal, 3, "Quadrature rule 4 points on a tetraedra vertices", TETRA, 4, 1)
const QuadratureRule quadRuleTetra15pt(pt_tetra_15pt, 5, "Quadrature rule 15 points on a tetraedra", TETRA, 15, 5)
UInt M_nbQuadPt
number of quadrature points
const QuadratureRule quadRuleTria4pt(pt_tria_4pt, 3, "Quadrature rule 4 points on a triangle", TRIANGLE, 4, 3)
void setDimensionShape(const UInt &newDim, const ReferenceShapes &newShape)
Change the dimension and the shape.
const QuadratureRule quadRuleTetra4pt(pt_tetra_4pt, 2, "Quadrature rule 4 points on a tetraedra", TETRA, 4, 2)
UInt M_dimension
Dimension in which the quadrature is stored.
UInt checkExactnessTetra() const
Check the exactness for quadrature rules on tetrahedra.
const QuadratureRule quadRuleNode1pt(pt_node_1pt, QUAD_RULE_NODE_1PT, "Gauss Legendre 1 point on a node", POINT, 1, 1)
virtual ~QuadratureRule()
Destructor.
boost::numeric::ublas::vector< Real > GeoVector
UInt checkExactness() const
Check for the exactness of the quadrature.
QuadratureRule(const QuadratureRule &qr)
Copy constructor.
void updateInverseJacobian(const UInt &iQuadPt)
const QuadratureRule quadRuleSeg4pt(pt_seg_4pt, QUAD_RULE_SEG_4PT, "Gauss Legendre 4 points on a segment", LINE, 4, 7)
ReferenceShapes M_shape
geometrical shape of the domain on which the quadrature rule can be used
const QuadratureRule quadRuleSeg2pt(pt_seg_2pt, QUAD_RULE_SEG_2PT, "Gauss Legendre 2 points on a segment", LINE, 2, 3)
const QuadratureRule quadRuleQuad9pt(pt_quad_9pt, 3, "Quadrature rule 9 points on a quadrangle", QUAD, 9, 5)
UInt checkExactnessSegment() const
Check the exactness for quadrature rules on segments.
const UInt & degreeOfExactness() const
Getter for the degree of exactness.
const QuadratureRule quadRuleQuad1pt(pt_quad_1pt, 1, "Quadrature rule 1 point on a quadrangle", QUAD, 1, 1)
const GeoVector & quadPointCoor(const UInt &ig) const
quadPointCoor(ig) is the full coordinates of the quadrature point ig
QuadratureRule(const QuadratureRule &qr, const UInt dim)
Copy constructor using a different dimension.
void vtkExport(const std::string &filename) const
VTK export for the quadrature.
QuadratureRule()
Empty constructor.
const QuadratureRule quadRuleTetra5pt(pt_tetra_5pt, 4, "Quadrature rule 5 points on a tetraedra", TETRA, 5, 3)
QuadraturePoint - Simple container for a point of a quadrature rule.
static Real S_exactnessTol
Tolerance for the test of exactness.
const QuadratureRule quadRuleSeg1pt(pt_seg_1pt, QUAD_RULE_SEG_1PT, "Gauss Legendre 1 point on a segment", LINE, 1, 1)
UInt checkExactnessTriangle() const
Check the exactness for quadrature rules on triangles.
double Real
Generic real data.
const QuadratureRule quadRuleTria3pt(pt_tria_3pt, 2, "Quadrature rule 3 points on a triangle", TRIANGLE, 3, 2)
std::string M_name
name of the quadrature rule
const QuadratureRule quadRuleTetra1pt(pt_tetra_1pt, 1, "Quadrature rule 1 point on a tetraedra", TETRA, 1, 1)
void setPoints(const std::vector< QuadraturePoint > &pts)
Change the quadrature points for the ones given here.
const QuadratureRule quadRuleTria7pt(pt_tria_7pt, 5, "Quadrature rule 7 points on a triangle", TRIANGLE, 7, 5)
const QuadratureRule quadRuleTria6pt(pt_tria_6pt, 4, "Quadrature rule 6 points on a triangle", TRIANGLE, 6, 4)
void showMe(std::ostream &output=std::cout) const
ShowMe method.
const QuadraturePoint & quadPoint(const UInt &ig) const
quadPoint(ig) is the ig-th quadrature point
void setName(const std::string &newName)
Change the name of the quadrature.
void setPoints(const std::vector< GeoVector > &coordinates, const std::vector< Real > &weights)
Change the quadrature points for the one given here.
const QuadratureRule quadRuleHexa1pt(pt_hexa_1pt, 1, "Quadrature rule 1 point on a hexa", HEXA, 1, 1)
const QuadratureRule quadRuleHexa8pt(pt_hexa_8pt, 2, "Quadrature rule 8 points on a hexa", HEXA, 8, 3)
const std::string & name() const
Getter for the name of the quadrature.
QuadratureRule - The basis class for storing and accessing quadrature rules.
std::vector< QuadraturePoint > M_pt
void setExactness(const UInt &exactness)
Change the degree of exactness.
void import(const QRType &qr)
Method for importing the quadrature rule from another class.
const QuadratureRule quadRuleTria1pt(pt_tria_1pt, 1, "Quadrature rule 1 point on a triangle", TRIANGLE, 1, 1)
const UInt & nbQuadPt() const
Getter for the number of quadrature points.
QuadratureRule(const QuadraturePoint *pt, int id, std::string name, ReferenceShapes shape, UInt nbQuadPt, UInt degOfExact)
Full constructor using pointers.
uint32_type UInt
generic unsigned integer (used mainly for addressing)
const Real & quadPointCoor(const UInt &ig, const UInt &icoor) const
quadPointCoor(ig,icoor) is the coordinate icoor of the quadrature point ig
QuadratureRule(std::string name, ReferenceShapes shape, UInt dimension, UInt degreeOfExactness, UInt nbQuadPt,...)
Full constructor.