MFEM  v4.6.0
Finite element discretization library
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
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. More...
 
int GetOrder () const
 Return the order of the quadrature rule(s) used by all elements. More...
 
int GetNE () const
 Return the number of entities. More...
 
MeshGetMesh () const
 Returns the mesh. More...
 
virtual ElementTransformationGetTransformation (int idx)=0
 Get the (element or face) transformation of entity idx. More...
 
virtual Geometry::Type GetGeometry (int idx) const =0
 Return the geometry type of entity (element or face) idx. More...
 
const IntegrationRuleGetIntRule (int idx) const
 Return the IntegrationRule associated with entity idx. More...
 
virtual int GetPermutedIndex (int idx, int iq) const =0
 Returns the permuted index of the iq quadrature point in entity idx. More...
 
virtual int GetEntityIndex (const ElementTransformation &T) const =0
 Returns the index in the quadrature space of the entity associated with the transformation T. More...
 
virtual void Save (std::ostream &out) const =0
 Write the QuadratureSpace to the stream out. More...
 
virtual ~QuadratureSpaceBase ()
 

Protected Member Functions

 QuadratureSpaceBase (Mesh &mesh_, int order_=0)
 Protected constructor. Used by derived classes. More...
 
 QuadratureSpaceBase (Mesh &mesh_, Geometry::Type geom, const IntegrationRule &ir)
 Protected constructor. Used by derived classes. More...
 
void ConstructIntRules (int dim)
 Fill the int_rule array for each geometry type using order. More...
 

Protected Attributes

Meshmesh
 The underlying mesh. More...
 
int order
 The order of integration rule. More...
 
int size
 Total number of quadrature points. More...
 
Array< int > offsets
 Entity quadrature point offset array, of size num_entities + 1. More...
 
const IntegrationRuleint_rule [Geometry::NumGeom]
 The quadrature rules used for each geometry type. More...
 

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 43 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 17 of file qspace.cpp.

◆ ~QuadratureSpaceBase()

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

Definition at line 96 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 28 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.

Implemented in mfem::FaceQuadratureSpace, and 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 73 of file qspace.hpp.

◆ GetMesh()

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

Returns the mesh.

Definition at line 64 of file qspace.hpp.

◆ GetNE()

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

Return the number of entities.

Definition at line 61 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 58 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 55 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.

◆ 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 Function 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 40 of file qspace.hpp.

◆ mesh

Mesh& mfem::QuadratureSpaceBase::mesh
protected

The underlying mesh.

Definition at line 30 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 38 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.


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