MFEM v4.7.0
Finite element discretization library
Loading...
Searching...
No Matches
mfem::QuadratureSpace Class Reference

Class representing the storage layout of a QuadratureFunction. More...

#include <qspace.hpp>

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

Public Member Functions

 QuadratureSpace (Mesh *mesh_, int order_)
 Create a QuadratureSpace based on the global rules from IntRules.
 
 QuadratureSpace (Mesh &mesh_, const IntegrationRule &ir)
 Create a QuadratureSpace with an IntegrationRule, valid only when the mesh has one element type.
 
 QuadratureSpace (Mesh *mesh_, std::istream &in)
 Read a QuadratureSpace from the stream in.
 
int GetNE () const
 Returns number of elements in the mesh.
 
ElementTransformationGetTransformation (int idx) override
 Returns the element transformation of element idx.
 
Geometry::Type GetGeometry (int idx) const override
 Returns the geometry type of element idx.
 
const IntegrationRuleGetElementIntRule (int idx) const
 Get the IntegrationRule associated with mesh element idx.
 
int GetPermutedIndex (int idx, int iq) const override
 Returns the permuted index of the iq quadrature point in entity idx.
 
int GetEntityIndex (const ElementTransformation &T) const override
 Returns the element index of T.
 
void Save (std::ostream &out) const override
 Write the QuadratureSpace to the stream out.
 
- Public Member Functions inherited from mfem::QuadratureSpaceBase
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.
 
const IntegrationRuleGetIntRule (int idx) const
 Return the IntegrationRule associated with entity idx.
 
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

const VectorGetGeometricFactorWeights () const override
 Compute the det(J) (volume or faces, depending on the type).
 
void ConstructOffsets ()
 
void Construct ()
 
- Protected Member Functions inherited from mfem::QuadratureSpaceBase
 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.
 
void ConstructWeights () const
 Compute the integration weights.
 

Additional Inherited Members

- Protected Attributes inherited from mfem::QuadratureSpaceBase
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.
 

Detailed Description

Class representing the storage layout of a QuadratureFunction.

Multiple QuadratureFunctions can share the same QuadratureSpace.

Definition at line 119 of file qspace.hpp.

Constructor & Destructor Documentation

◆ QuadratureSpace() [1/3]

mfem::QuadratureSpace::QuadratureSpace ( Mesh * mesh_,
int order_ )
inline

Create a QuadratureSpace based on the global rules from IntRules.

Definition at line 127 of file qspace.hpp.

◆ QuadratureSpace() [2/3]

mfem::QuadratureSpace::QuadratureSpace ( Mesh & mesh_,
const IntegrationRule & ir )

Create a QuadratureSpace with an IntegrationRule, valid only when the mesh has one element type.

Definition at line 141 of file qspace.cpp.

◆ QuadratureSpace() [3/3]

mfem::QuadratureSpace::QuadratureSpace ( Mesh * mesh_,
std::istream & in )

Read a QuadratureSpace from the stream in.

Definition at line 118 of file qspace.cpp.

Member Function Documentation

◆ Construct()

void mfem::QuadratureSpace::Construct ( )
protected

Definition at line 112 of file qspace.cpp.

◆ ConstructOffsets()

void mfem::QuadratureSpace::ConstructOffsets ( )
protected

Definition at line 97 of file qspace.cpp.

◆ GetElementIntRule()

const IntegrationRule & mfem::QuadratureSpace::GetElementIntRule ( int idx) const
inline

Get the IntegrationRule associated with mesh element idx.

Definition at line 149 of file qspace.hpp.

◆ GetEntityIndex()

int mfem::QuadratureSpace::GetEntityIndex ( const ElementTransformation & T) const
inlineoverridevirtual

Returns the element index of T.

Implements mfem::QuadratureSpaceBase.

Definition at line 160 of file qspace.hpp.

◆ GetGeometricFactorWeights()

const Vector & mfem::QuadratureSpace::GetGeometricFactorWeights ( ) const
overrideprotectedvirtual

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

Implements mfem::QuadratureSpaceBase.

Definition at line 156 of file qspace.cpp.

◆ GetGeometry()

Geometry::Type mfem::QuadratureSpace::GetGeometry ( int idx) const
inlineoverridevirtual

Returns the geometry type of element idx.

Implements mfem::QuadratureSpaceBase.

Definition at line 145 of file qspace.hpp.

◆ GetNE()

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

Returns number of elements in the mesh.

Definition at line 138 of file qspace.hpp.

◆ GetPermutedIndex()

int mfem::QuadratureSpace::GetPermutedIndex ( int idx,
int iq ) const
inlineoverridevirtual

Returns the permuted index of the iq quadrature point in entity idx.

The member function QuadratureSpace::GetPermutedIndex always returns iq, the permutation is only nontrivial for FaceQuadratureSpace.

Implements mfem::QuadratureSpaceBase.

Definition at line 157 of file qspace.hpp.

◆ GetTransformation()

ElementTransformation * mfem::QuadratureSpace::GetTransformation ( int idx)
inlineoverridevirtual

Returns the element transformation of element idx.

Implements mfem::QuadratureSpaceBase.

Definition at line 141 of file qspace.hpp.

◆ Save()

void mfem::QuadratureSpace::Save ( std::ostream & out) const
overridevirtual

Write the QuadratureSpace to the stream out.

Implements mfem::QuadratureSpaceBase.

Definition at line 149 of file qspace.cpp.


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