MFEM v4.7.0
Finite element discretization library
|
Abstract base class for QuadratureSpace and FaceQuadratureSpace. More...
#include <qspace.hpp>
Public Member Functions | |
int | GetSize () const |
Return the total number of quadrature points. | |
int | GetOrder () const |
Return the order of the quadrature rule(s) used by all elements. | |
int | GetNE () const |
Return the number of entities. | |
Mesh * | GetMesh () const |
Returns the mesh. | |
virtual ElementTransformation * | GetTransformation (int idx)=0 |
Get the (element or face) transformation of entity idx. | |
virtual Geometry::Type | GetGeometry (int idx) const =0 |
Return the geometry type of entity (element or face) idx. | |
const IntegrationRule & | GetIntRule (int idx) const |
Return the IntegrationRule associated with entity idx. | |
virtual int | GetPermutedIndex (int idx, int iq) const =0 |
Returns the permuted index of the iq quadrature point in entity idx. | |
virtual int | GetEntityIndex (const ElementTransformation &T) const =0 |
Returns the index in the quadrature space of the entity associated with the transformation T. | |
virtual void | Save (std::ostream &out) const =0 |
Write the QuadratureSpace to the stream out. | |
const Vector & | GetWeights () const |
Return the integration weights (including geometric factors). | |
real_t | Integrate (Coefficient &coeff) const |
Return the integral of the scalar Coefficient coeff. | |
void | Integrate (VectorCoefficient &coeff, Vector &integrals) const |
Return the integral of the VectorCoefficient coeff in integrals. | |
virtual | ~QuadratureSpaceBase () |
Protected Member Functions | |
QuadratureSpaceBase (Mesh &mesh_, int order_=0) | |
Protected constructor. Used by derived classes. | |
QuadratureSpaceBase (Mesh &mesh_, Geometry::Type geom, const IntegrationRule &ir) | |
Protected constructor. Used by derived classes. | |
void | ConstructIntRules (int dim) |
Fill the int_rule array for each geometry type using order. | |
virtual const Vector & | GetGeometricFactorWeights () const =0 |
Compute the det(J) (volume or faces, depending on the type). | |
void | ConstructWeights () const |
Compute the integration weights. | |
Protected Attributes | |
Mesh & | mesh |
The underlying mesh. | |
int | order |
The order of integration rule. | |
int | size |
Total number of quadrature points. | |
Vector | weights |
Integration weights. | |
long | nodes_sequence = 0 |
Nodes counter for cache invalidation. | |
Array< int > | offsets |
Entity quadrature point offset array, of size num_entities + 1. | |
const IntegrationRule * | int_rule [Geometry::NumGeom] |
The quadrature rules used for each geometry type. | |
Friends | |
class | QuadratureFunction |
Abstract base class for QuadratureSpace and FaceQuadratureSpace.
This class represents the storage layout for QuadratureFunctions, that may be defined either on mesh elements or mesh faces.
Definition at line 25 of file qspace.hpp.
|
inlineprotected |
Protected constructor. Used by derived classes.
Definition at line 45 of file qspace.hpp.
|
protected |
Protected constructor. Used by derived classes.
Definition at line 19 of file qspace.cpp.
|
inlinevirtual |
Definition at line 114 of file qspace.hpp.
|
protected |
Fill the int_rule array for each geometry type using order.
Definition at line 30 of file qspace.cpp.
|
protected |
Compute the integration weights.
Definition at line 58 of file qspace.cpp.
|
pure virtual |
Returns the index in the quadrature space of the entity associated with the transformation T.
For a QuadratureSpace defined on elements, this just returns the element index. For FaceQuadratureSpace, the returned index depends on the chosen FaceType. If the entity is not found (for example, if T represents an interior face, and the space has FaceType::Boundary) then -1 is returned.
Implemented in mfem::FaceQuadratureSpace, and mfem::QuadratureSpace.
|
protectedpure virtual |
Compute the det(J) (volume or faces, depending on the type).
Implemented in mfem::QuadratureSpace.
|
pure virtual |
Return the geometry type of entity (element or face) idx.
Implemented in mfem::FaceQuadratureSpace, and mfem::QuadratureSpace.
|
inline |
Return the IntegrationRule associated with entity idx.
Definition at line 81 of file qspace.hpp.
|
inline |
Returns the mesh.
Definition at line 72 of file qspace.hpp.
|
inline |
Return the number of entities.
Definition at line 69 of file qspace.hpp.
|
inline |
Return the order of the quadrature rule(s) used by all elements.
Definition at line 66 of file qspace.hpp.
|
pure virtual |
Returns the permuted index of the iq quadrature point in entity idx.
For tensor-product faces, returns the lexicographic index of the quadrature point, oriented relative to "element 1". For QuadratureSpaces defined on elements (not faces), the permutation is trivial, and this returns iq.
Implemented in mfem::FaceQuadratureSpace, and mfem::QuadratureSpace.
|
inline |
Return the total number of quadrature points.
Definition at line 63 of file qspace.hpp.
|
pure virtual |
Get the (element or face) transformation of entity idx.
Implemented in mfem::FaceQuadratureSpace, and mfem::QuadratureSpace.
const Vector & mfem::QuadratureSpaceBase::GetWeights | ( | ) | const |
Return the integration weights (including geometric factors).
Definition at line 71 of file qspace.cpp.
real_t mfem::QuadratureSpaceBase::Integrate | ( | Coefficient & | coeff | ) | const |
Return the integral of the scalar Coefficient coeff.
Definition at line 81 of file qspace.cpp.
void mfem::QuadratureSpaceBase::Integrate | ( | VectorCoefficient & | coeff, |
Vector & | integrals ) const |
Return the integral of the VectorCoefficient coeff in integrals.
Definition at line 88 of file qspace.cpp.
|
pure virtual |
Write the QuadratureSpace to the stream out.
Implemented in mfem::FaceQuadratureSpace, and mfem::QuadratureSpace.
|
friend |
Definition at line 28 of file qspace.hpp.
|
protected |
The quadrature rules used for each geometry type.
Definition at line 42 of file qspace.hpp.
|
protected |
The underlying mesh.
Definition at line 30 of file qspace.hpp.
|
mutableprotected |
Nodes counter for cache invalidation.
Definition at line 34 of file qspace.hpp.
|
protected |
Entity quadrature point offset array, of size num_entities + 1.
The quadrature point values for entity i are stored in the indices between offsets[i] and offsets[i+1].
Definition at line 40 of file qspace.hpp.
|
protected |
The order of integration rule.
Definition at line 31 of file qspace.hpp.
|
protected |
Total number of quadrature points.
Definition at line 32 of file qspace.hpp.
|
mutableprotected |
Integration weights.
Definition at line 33 of file qspace.hpp.