![]() |
MFEM v4.9.0
Finite element discretization library
|
Abstract base class for QuadratureSpace and FaceQuadratureSpace. More...
#include <qspace.hpp>
Public Member Functions | |
| int | Offset (int idx) const |
| Gets the offset for a given entity idx. | |
| const Array< int > & | Offsets (QSpaceOffsetStorage storage) const |
| Entity quadrature point offset array. | |
| 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. | |
| int | ne |
| Number of entities. | |
| Vector | weights |
| Integration weights. | |
| long | nodes_sequence = 0 |
| Nodes counter for cache invalidation. | |
| Array< int > | offsets |
| Entity quadrature point offset array. | |
| Array< int > | full_offset_cache |
| Cached version of the "full" offsets, returned by Offsets() when QSpaceOffsetStorage::FULL is provided. | |
| 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 31 of file qspace.hpp.
|
inlineprotected |
Protected constructor. Used by derived classes.
Definition at line 65 of file qspace.hpp.
|
protected |
Protected constructor. Used by derived classes.
Definition at line 19 of file qspace.cpp.
|
inlinevirtual |
Definition at line 158 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 81 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 125 of file qspace.hpp.
|
inline |
Returns the mesh.
Definition at line 116 of file qspace.hpp.
|
inline |
Return the number of entities.
Definition at line 113 of file qspace.hpp.
|
inline |
Return the order of the quadrature rule(s) used by all elements.
Definition at line 110 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 107 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 94 of file qspace.cpp.
| real_t mfem::QuadratureSpaceBase::Integrate | ( | Coefficient & | coeff | ) | const |
Return the integral of the scalar Coefficient coeff.
Definition at line 104 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 111 of file qspace.cpp.
|
inline |
Gets the offset for a given entity idx.
The quadrature point values for entity i are stored in the indices between Offset(i) and Offset(i+1)
Definition at line 86 of file qspace.hpp.
| const Array< int > & mfem::QuadratureSpaceBase::Offsets | ( | QSpaceOffsetStorage | storage | ) | const |
Entity quadrature point offset array.
If storage is QSpaceOffsetStorage::COMPRESSED, then the returned array supports a constant compression scheme for meshes which have a single geometry type. When compressed, will have a single value. The true offset can be computed as i * offsets[0], where i is the entity index. Otherwise has size num_entities + 1.
If storage is QSpaceOffsetStorage::FULL, then the array will never be compressed.
In the non-compressed case, 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.cpp.
|
pure virtual |
Write the QuadratureSpace to the stream out.
Implemented in mfem::FaceQuadratureSpace, and mfem::QuadratureSpace.
|
friend |
Definition at line 34 of file qspace.hpp.
|
mutableprotected |
Cached version of the "full" offsets, returned by Offsets() when QSpaceOffsetStorage::FULL is provided.
The quadrature point values for entity i are stored in the indices between offsets[i] and offsets[i+1].
Definition at line 59 of file qspace.hpp.
|
protected |
The quadrature rules used for each geometry type.
Definition at line 62 of file qspace.hpp.
|
protected |
The underlying mesh.
Definition at line 36 of file qspace.hpp.
|
protected |
Number of entities.
Definition at line 39 of file qspace.hpp.
|
mutableprotected |
Nodes counter for cache invalidation.
Definition at line 41 of file qspace.hpp.
|
protected |
Entity quadrature point offset array.
Supports a constant compression scheme for meshes which have a single geometry type. When compressed, will have a single value. The true offset can be computed as i * offsets[0], where i is the entity index. Otherwise has size num_entities + 1.
In the non-compressed case, the quadrature point values for entity i are stored in the indices between offsets[i] and offsets[i+1].
Definition at line 52 of file qspace.hpp.
|
protected |
The order of integration rule.
Definition at line 37 of file qspace.hpp.
|
protected |
Total number of quadrature points.
Definition at line 38 of file qspace.hpp.
|
mutableprotected |
Integration weights.
Definition at line 40 of file qspace.hpp.