20#ifndef LIBMESH_FE_TYPE_H
21#define LIBMESH_FE_TYPE_H
24#include "libmesh/compare_types.h"
25#include "libmesh/libmesh_config.h"
26#include "libmesh/enum_order.h"
27#include "libmesh/enum_fe_family.h"
28#include "libmesh/enum_inf_map_type.h"
29#include "libmesh/hashing.h"
106 friend struct std::hash<
FEType>;
121#define OrderWrapperOperators(comparisontype) \
122 inline bool operator==(comparisontype lhs, Order rhs) \
123 { return lhs == static_cast<comparisontype>(rhs); } \
124 inline bool operator==(Order lhs, comparisontype rhs) \
125 { return static_cast<comparisontype>(lhs) == rhs; } \
126 inline bool operator!=(comparisontype lhs, Order rhs) \
127 { return !(lhs == rhs); } \
128 inline bool operator!=(Order lhs, comparisontype rhs) \
129 { return !(lhs == rhs); } \
130 inline bool operator< (comparisontype lhs, Order rhs) \
131 { return lhs < static_cast<comparisontype>(rhs); } \
132 inline bool operator< (Order lhs, comparisontype rhs) \
133 { return static_cast<comparisontype>(lhs) < rhs; } \
134 inline bool operator> (comparisontype lhs, Order rhs) \
135 { return rhs < lhs; } \
136 inline bool operator> (Order lhs, comparisontype rhs) \
137 { return rhs < lhs; } \
138 inline bool operator<=(comparisontype lhs, Order rhs) \
139 { return !(lhs > rhs); } \
140 inline bool operator<=(Order lhs, comparisontype rhs) \
141 { return !(lhs > rhs); } \
142 inline bool operator>=(comparisontype lhs, Order rhs) \
143 { return !(lhs < rhs); } \
144 inline bool operator>=(Order lhs, comparisontype rhs) \
145 { return !(lhs < rhs); }
149#if LIBMESH_SIZEOF_SIZE_T != LIBMESH_SIZEOF_UNSIGNED_INT
205#ifndef LIBMESH_ENABLE_INFINITE_ELEMENTS
248 const int ro =
THIRD,
300 this->p_refinement = p;
310 this->p_refinement = p;
311 return std::move(*
this);
322#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
335 return !(*
this == f2);
349#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
380 const int extraorder=0)
const;
403 const int extraorder=0)
const;
435 std::size_t seed = 0;
440#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
void ErrorVector unsigned int
class FEType hides (possibly multiple) FEFamily and approximation orders, thereby enabling specialize...
FEType(const int o=1, const FEFamily f=LAGRANGE, const int ro=THIRD, const FEFamily rf=JACOBI_20_00, const InfMapType im=CARTESIAN)
Constructor.
InfMapType inf_map
The coordinate mapping type of the infinite element.
OrderWrapper radial_order
The approximation order in radial direction of the infinite element.
std::unique_ptr< QBase > default_quadrature_rule(const unsigned int dim, const int extraorder=0) const
FEType set_p_refinement(bool p) &&
Specialization for rvalues so we don't return a dangling reference to a temporary.
std::unique_ptr< QBase > unweighted_quadrature_rule(const unsigned int dim, const int extraorder=0) const
Order default_quadrature_order() const
bool operator!=(const FEType &f2) const
Tests inequality.
FEType(const int o=1, const FEFamily f=LAGRANGE)
Constructor.
bool operator==(const FEType &f2) const
Tests equality.
FEType set_p_refinement(bool p) &
"Fluent API" for constructing a non-default p_refinement, for easier compatibility between non-InfFE ...
OrderWrapper order
The approximation order of the element (at 0 p-refinement level).
bool p_refinement
Whether or not the finite elements for this type increase their p refinement level on geometric eleme...
FEFamily radial_family
The type of approximation in radial direction.
bool operator<(const FEType &f2) const
An ordering to make FEType useful as a std::map key.
FEFamily family
The type of finite element.
Order unweighted_quadrature_order() const
This provides a shim class that wraps the Order enum.
OrderWrapper & operator+=(T p)
OrderWrapper & operator-=(T p)
OrderWrapper(int order)
Constructor.
OrderWrapper(Order order)
Constructor.
int _order
The approximation order of the element.
int get_order() const
Explicitly request the order as an int.
void hash_combine(std::size_t &seed, const T &value)
The libMesh namespace provides an interface to certain functionality in the library.
OrderWrapperOperators(int) OrderWrapperOperators(unsigned int) OrderWrapperOperators(std
bool operator!=(const OrderWrapper &lhs, const OrderWrapper &rhs)
bool operator<(const OrderWrapper &lhs, const OrderWrapper &rhs)
std::ostream & operator<<(std::ostream &os, const OrderWrapper &order)
Overload stream operators.
bool operator==(const OrderWrapper &lhs, const OrderWrapper &rhs)
Overload comparison operators for OrderWrapper.
bool operator<=(const OrderWrapper &lhs, const OrderWrapper &rhs)
bool operator>=(const OrderWrapper &lhs, const OrderWrapper &rhs)
bool operator>(const OrderWrapper &lhs, const OrderWrapper &rhs)
std::size_t operator()(const libMesh::FEType &fe_type) const