19 : mesh(mesh_), order(ir.GetOrder())
43 for (
int i = 0; i < num_elem; i++)
47 MFEM_ASSERT(
int_rule[geom] != NULL,
"Missing integration rule.");
62 const char *msg =
"invalid input stream";
65 in >> ident; MFEM_VERIFY(ident ==
"QuadratureSpace", msg);
66 in >> ident; MFEM_VERIFY(ident ==
"Type:", msg);
68 if (ident ==
"default_quadrature")
70 in >> ident; MFEM_VERIFY(ident ==
"Order:", msg);
75 MFEM_ABORT(
"unknown QuadratureSpace type: " << ident);
86 "Constructor not valid for mixed meshes");
92 os <<
"QuadratureSpace\n" 93 <<
"Type: default_quadrature\n" 94 <<
"Order: " <<
order <<
'\n';
100 face_type(face_type_),
101 num_faces(mesh.GetNFbyType(face_type))
109 face_type(face_type_),
110 num_faces(mesh.GetNFbyType(face_type))
113 "Constructor not valid for mixed meshes");
117 void FaceQuadratureSpace::ConstructOffsets()
119 face_indices.
SetSize(num_faces);
130 face_indices[f_idx] = i;
133 MFEM_ASSERT(
int_rule[geom] != NULL,
"Missing integration rule");
141 void FaceQuadratureSpace::Construct()
149 const int f_idx = face_indices[idx];
154 const int q1d = (int)floor(pow(ir.
GetNPoints(), 1.0/(
dim-1)) + 0.5);
166 os <<
"FaceQuadratureSpace\n" 167 <<
"Type: default_quadrature\n" 168 <<
"Order: " <<
order <<
'\n';
Geometry::Type GetGeometry(int idx) const override
Returns the geometry type of face idx.
int GetNPoints() const
Returns the number of the points in the integration rule.
Class for an integration rule - an Array of IntegrationPoint.
const IntegrationRule & Get(int GeomType, int Order)
Returns an integration rule for given GeomType and Order.
Geometry::Type GetElementBaseGeometry(int i) const
Geometry::Type GetFaceGeometry(int i) const
Return the Geometry::Type associated with face i.
QuadratureSpaceBase(Mesh &mesh_, int order_=0)
Protected constructor. Used by derived classes.
int size
Total number of quadrature points.
int GetPermutedIndex(int idx, int iq) const override
Returns the permuted index of the iq quadrature point in entity idx.
int GetNumGeometries(int dim) const
Return the number of geometries of the given dimension present in the mesh.
IntegrationRules IntRules(0, Quadrature1D::GaussLegendre)
A global object with all integration rules (defined in intrules.cpp)
void Save(std::ostream &out) const override
Write the QuadratureSpace to the stream out.
Array< int > offsets
Entity quadrature point offset array, of size num_entities + 1.
Abstract base class for QuadratureSpace and FaceQuadratureSpace.
int ToLexOrdering(const int dim, const int face_id, const int size1d, const int index)
Convert a dof face index from Native ordering to lexicographic ordering for quads and hexes...
FaceQuadratureSpace(Mesh &mesh_, int order_, FaceType face_type_)
Create a FaceQuadratureSpace based on the global rules from IntRules.
void SetSize(int nsize)
Change the logical size of the array, keep existing entries.
const IntegrationRule & GetIntRule(int idx) const
Return the IntegrationRule associated with entity idx.
void GetGeometries(int dim, Array< Geometry::Type > &el_geoms) const
Return all element geometries of the given dimension present in the mesh.
int GetNE() const
Returns number of elements.
static bool IsTensorProduct(Type geom)
Mesh & mesh
The underlying mesh.
const IntegrationRule * int_rule[Geometry::NumGeom]
The quadrature rules used for each geometry type.
void Save(std::ostream &out) const override
Write the FaceQuadratureSpace to the stream out.
QuadratureSpace(Mesh *mesh_, int order_)
Create a QuadratureSpace based on the global rules from IntRules.
FaceInformation GetFaceInformation(int f) const
int GetNumFacesWithGhost() const
Return the number of faces (3D), edges (2D) or vertices (1D) including ghost faces.
void ConstructIntRules(int dim)
Fill the int_rule array for each geometry type using order.
int order
The order of integration rule.