MFEM v4.7.0
Finite element discretization library
Loading...
Searching...
No Matches
mfem::QuadratureSpaceBase Class Referenceabstract

Abstract base class for QuadratureSpace and FaceQuadratureSpace. More...

#include <qspace.hpp>

Inheritance diagram for mfem::QuadratureSpaceBase:
[legend]
Collaboration diagram for mfem::QuadratureSpaceBase:
[legend]

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.
 
MeshGetMesh () const
 Returns the mesh.
 
virtual ElementTransformationGetTransformation (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 IntegrationRuleGetIntRule (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 VectorGetWeights () 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 VectorGetGeometricFactorWeights () const =0
 Compute the det(J) (volume or faces, depending on the type).
 
void ConstructWeights () const
 Compute the integration weights.
 

Protected Attributes

Meshmesh
 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 IntegrationRuleint_rule [Geometry::NumGeom]
 The quadrature rules used for each geometry type.
 

Friends

class QuadratureFunction
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ QuadratureSpaceBase() [1/2]

mfem::QuadratureSpaceBase::QuadratureSpaceBase ( Mesh & mesh_,
int order_ = 0 )
inlineprotected

Protected constructor. Used by derived classes.

Definition at line 45 of file qspace.hpp.

◆ QuadratureSpaceBase() [2/2]

mfem::QuadratureSpaceBase::QuadratureSpaceBase ( Mesh & mesh_,
Geometry::Type geom,
const IntegrationRule & ir )
protected

Protected constructor. Used by derived classes.

Definition at line 19 of file qspace.cpp.

◆ ~QuadratureSpaceBase()

virtual mfem::QuadratureSpaceBase::~QuadratureSpaceBase ( )
inlinevirtual

Definition at line 114 of file qspace.hpp.

Member Function Documentation

◆ ConstructIntRules()

void mfem::QuadratureSpaceBase::ConstructIntRules ( int dim)
protected

Fill the int_rule array for each geometry type using order.

Definition at line 30 of file qspace.cpp.

◆ ConstructWeights()

void mfem::QuadratureSpaceBase::ConstructWeights ( ) const
protected

Compute the integration weights.

Definition at line 58 of file qspace.cpp.

◆ GetEntityIndex()

virtual int mfem::QuadratureSpaceBase::GetEntityIndex ( const ElementTransformation & T) const
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.

◆ GetGeometricFactorWeights()

virtual const Vector & mfem::QuadratureSpaceBase::GetGeometricFactorWeights ( ) const
protectedpure virtual

Compute the det(J) (volume or faces, depending on the type).

Implemented in mfem::QuadratureSpace.

◆ GetGeometry()

virtual Geometry::Type mfem::QuadratureSpaceBase::GetGeometry ( int idx) const
pure virtual

Return the geometry type of entity (element or face) idx.

Implemented in mfem::FaceQuadratureSpace, and mfem::QuadratureSpace.

◆ GetIntRule()

const IntegrationRule & mfem::QuadratureSpaceBase::GetIntRule ( int idx) const
inline

Return the IntegrationRule associated with entity idx.

Definition at line 81 of file qspace.hpp.

◆ GetMesh()

Mesh * mfem::QuadratureSpaceBase::GetMesh ( ) const
inline

Returns the mesh.

Definition at line 72 of file qspace.hpp.

◆ GetNE()

int mfem::QuadratureSpaceBase::GetNE ( ) const
inline

Return the number of entities.

Definition at line 69 of file qspace.hpp.

◆ GetOrder()

int mfem::QuadratureSpaceBase::GetOrder ( ) const
inline

Return the order of the quadrature rule(s) used by all elements.

Definition at line 66 of file qspace.hpp.

◆ GetPermutedIndex()

virtual int mfem::QuadratureSpaceBase::GetPermutedIndex ( int idx,
int iq ) const
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.

◆ GetSize()

int mfem::QuadratureSpaceBase::GetSize ( ) const
inline

Return the total number of quadrature points.

Definition at line 63 of file qspace.hpp.

◆ GetTransformation()

virtual ElementTransformation * mfem::QuadratureSpaceBase::GetTransformation ( int idx)
pure virtual

Get the (element or face) transformation of entity idx.

Implemented in mfem::FaceQuadratureSpace, and mfem::QuadratureSpace.

◆ GetWeights()

const Vector & mfem::QuadratureSpaceBase::GetWeights ( ) const

Return the integration weights (including geometric factors).

Definition at line 71 of file qspace.cpp.

◆ Integrate() [1/2]

real_t mfem::QuadratureSpaceBase::Integrate ( Coefficient & coeff) const

Return the integral of the scalar Coefficient coeff.

Definition at line 81 of file qspace.cpp.

◆ Integrate() [2/2]

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.

◆ Save()

virtual void mfem::QuadratureSpaceBase::Save ( std::ostream & out) const
pure virtual

Write the QuadratureSpace to the stream out.

Implemented in mfem::FaceQuadratureSpace, and mfem::QuadratureSpace.

Friends And Related Symbol Documentation

◆ QuadratureFunction

friend class QuadratureFunction
friend

Definition at line 28 of file qspace.hpp.

Member Data Documentation

◆ int_rule

const IntegrationRule* mfem::QuadratureSpaceBase::int_rule[Geometry::NumGeom]
protected

The quadrature rules used for each geometry type.

Definition at line 42 of file qspace.hpp.

◆ mesh

Mesh& mfem::QuadratureSpaceBase::mesh
protected

The underlying mesh.

Definition at line 30 of file qspace.hpp.

◆ nodes_sequence

long mfem::QuadratureSpaceBase::nodes_sequence = 0
mutableprotected

Nodes counter for cache invalidation.

Definition at line 34 of file qspace.hpp.

◆ offsets

Array<int> mfem::QuadratureSpaceBase::offsets
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.

◆ order

int mfem::QuadratureSpaceBase::order
protected

The order of integration rule.

Definition at line 31 of file qspace.hpp.

◆ size

int mfem::QuadratureSpaceBase::size
protected

Total number of quadrature points.

Definition at line 32 of file qspace.hpp.

◆ weights

Vector mfem::QuadratureSpaceBase::weights
mutableprotected

Integration weights.

Definition at line 33 of file qspace.hpp.


The documentation for this class was generated from the following files: