15 constexpr
operator int() {
return d; }
27 if (g == mfem::Geometry::SEGMENT) {
30 if (g == mfem::Geometry::TRIANGLE) {
31 return (Q * (Q + 1)) / 2;
33 if (g == mfem::Geometry::SQUARE) {
36 if (g == mfem::Geometry::TETRAHEDRON) {
37 return (Q * (Q + 1) * (Q + 2)) / 6;
39 if (g == mfem::Geometry::CUBE) {
51 if (g == mfem::Geometry::SEGMENT) {
55 if (g == mfem::Geometry::TRIANGLE || g == mfem::Geometry::SQUARE) {
59 if (g == mfem::Geometry::TETRAHEDRON || g == mfem::Geometry::CUBE) {
70 inline std::array<uint32_t, mfem::Geometry::NUM_GEOMETRIES>
geometry_counts(
const mfem::Mesh& mesh)
72 std::array<uint32_t, mfem::Geometry::NUM_GEOMETRIES> counts{};
73 for (
int i = 0; i < mesh.GetNE(); i++) {
74 counts[uint64_t(mesh.GetElementGeometry(i))]++;
85 std::array<uint32_t, mfem::Geometry::NUM_GEOMETRIES> counts{};
86 for (
int f = 0; f < mesh.GetNumFaces(); f++) {
88 if (mesh.GetFaceInformation(f).IsInterior())
continue;
90 counts[uint64_t(mesh.GetFaceGeometry(f))]++;
Accelerator functionality.
constexpr int num_quadrature_points(mfem::Geometry::Type g, int Q)
return the number of quadrature points in a Gauss-Legendre rule with parameter "Q"
std::array< uint32_t, mfem::Geometry::NUM_GEOMETRIES > boundary_geometry_counts(const mfem::Mesh &mesh)
count the number of boundary elements of each geometry in a mesh
constexpr int dimension_of(mfem::Geometry::Type g)
Returns the dimension of an element geometry.
std::array< uint32_t, mfem::Geometry::NUM_GEOMETRIES > geometry_counts(const mfem::Mesh &mesh)
count the number of elements of each geometry in a mesh
Compile-time alias for a dimension.