17#include <unordered_map>
103 virtual void Save(std::ostream &
out)
const = 0;
163 void Save(std::ostream &
out)
const override;
178 std::unordered_map<int,int> face_indices_inv;
180 const Vector &GetGeometricFactorWeights()
const override;
181 void ConstructOffsets();
229 void Save(std::ostream &
out)
const override;
int Size() const
Return the logical size of the array.
Base class Coefficients that optionally depend on space and time. These are used by the BilinearFormI...
Class representing the storage layout of a FaceQuadratureFunction.
FaceType GetFaceType() const
Returns the face type (boundary or interior).
int GetMeshFaceIndex(int idx) const
Get the face index (in the standard Mesh numbering) associated with face idx in the FaceQuadratureSpa...
int GetEntityIndex(const ElementTransformation &T) const override
Returns the index associated with the face described by T.
Geometry::Type GetGeometry(int idx) const override
Returns the geometry type of face idx.
void Save(std::ostream &out) const override
Write the FaceQuadratureSpace to the stream out.
int GetPermutedIndex(int idx, int iq) const override
Returns the permuted index of the iq quadrature point in entity idx.
const IntegrationRule & GetFaceIntRule(int idx) const
Get the IntegrationRule associated with mesh element idx.
FaceQuadratureSpace(Mesh &mesh_, int order_, FaceType face_type_)
Create a FaceQuadratureSpace based on the global rules from IntRules.
int GetNumFaces() const
Returns number of faces in the mesh.
ElementTransformation * GetTransformation(int idx) override
Returns the face transformation of face idx.
Class for an integration rule - an Array of IntegrationPoint.
Geometry::Type GetFaceGeometry(int i) const
Return the Geometry::Type associated with face i.
Geometry::Type GetElementGeometry(int i) const
ElementTransformation * GetFaceTransformation(int FaceNo)
Returns a pointer to the transformation defining the given face element.
int GetNE() const
Returns number of elements.
void GetElementTransformation(int i, IsoparametricTransformation *ElTr) const
Builds the transformation defining the i-th element in ElTr. ElTr must be allocated in advance and wi...
Geometry::Type GetElementBaseGeometry(int i) const
Represents values or vectors of values at quadrature points on a mesh.
Abstract base class for QuadratureSpace and FaceQuadratureSpace.
Vector weights
Integration weights.
virtual Geometry::Type GetGeometry(int idx) const =0
Return the geometry type of entity (element or face) idx.
const Vector & GetWeights() const
Return the integration weights (including geometric factors).
void ConstructWeights() const
Compute the integration weights.
int GetNE() const
Return the number of entities.
virtual void Save(std::ostream &out) const =0
Write the QuadratureSpace to the stream out.
void ConstructIntRules(int dim)
Fill the int_rule array for each geometry type using order.
virtual ElementTransformation * GetTransformation(int idx)=0
Get the (element or face) transformation of entity idx.
int GetSize() const
Return the total number of quadrature points.
const IntegrationRule * int_rule[Geometry::NumGeom]
The quadrature rules used for each geometry type.
QuadratureSpaceBase(Mesh &mesh_, int order_=0)
Protected constructor. Used by derived classes.
long nodes_sequence
Nodes counter for cache invalidation.
int order
The order of integration rule.
const IntegrationRule & GetIntRule(int idx) const
Return the IntegrationRule associated with entity idx.
virtual const Vector & GetGeometricFactorWeights() const =0
Compute the det(J) (volume or faces, depending on the type).
virtual int GetEntityIndex(const ElementTransformation &T) const =0
Returns the index in the quadrature space of the entity associated with the transformation T.
virtual int GetPermutedIndex(int idx, int iq) const =0
Returns the permuted index of the iq quadrature point in entity idx.
int GetOrder() const
Return the order of the quadrature rule(s) used by all elements.
Mesh & mesh
The underlying mesh.
Array< int > offsets
Entity quadrature point offset array, of size num_entities + 1.
int size
Total number of quadrature points.
virtual ~QuadratureSpaceBase()
Mesh * GetMesh() const
Returns the mesh.
real_t Integrate(Coefficient &coeff) const
Return the integral of the scalar Coefficient coeff.
Class representing the storage layout of a QuadratureFunction.
int GetEntityIndex(const ElementTransformation &T) const override
Returns the element index of T.
int GetPermutedIndex(int idx, int iq) const override
Returns the permuted index of the iq quadrature point in entity idx.
const Vector & GetGeometricFactorWeights() const override
Compute the det(J) (volume or faces, depending on the type).
int GetNE() const
Returns number of elements in the mesh.
const IntegrationRule & GetElementIntRule(int idx) const
Get the IntegrationRule associated with mesh element idx.
ElementTransformation * GetTransformation(int idx) override
Returns the element transformation of element idx.
void Save(std::ostream &out) const override
Write the QuadratureSpace to the stream out.
QuadratureSpace(Mesh *mesh_, int order_)
Create a QuadratureSpace based on the global rules from IntRules.
Geometry::Type GetGeometry(int idx) const override
Returns the geometry type of element idx.
Base class for vector Coefficients that optionally depend on time and space.
OutStream out(std::cout)
Global stream used by the library for standard output. Initially it uses the same std::streambuf as s...