libMesh
Public Member Functions | Public Attributes | List of all members
libMesh::FEType Class Reference

class FEType hides (possibly multiple) FEFamily and approximation orders, thereby enabling specialized finite element families. More...

#include <fe_type.h>

Public Member Functions

 FEType (const int o=1, const FEFamily f=LAGRANGE)
 Constructor. More...
 
 FEType (const int o=1, const FEFamily f=LAGRANGE, const int ro=THIRD, const FEFamily rf=JACOBI_20_00, const InfMapType im=CARTESIAN)
 Constructor. More...
 
bool operator== (const FEType &f2) const
 Tests equality. More...
 
bool operator!= (const FEType &f2) const
 Tests inequality. More...
 
bool operator< (const FEType &f2) const
 An ordering to make FEType useful as a std::map key. More...
 
Order default_quadrature_order () const
 
std::unique_ptr< QBasedefault_quadrature_rule (const unsigned int dim, const int extraorder=0) const
 

Public Attributes

OrderWrapper order
 The approximation order of the element. More...
 
FEFamily family
 The type of finite element. More...
 
OrderWrapper radial_order
 The approximation order in the base of the infinite element. More...
 
FEFamily radial_family
 For InfFE, family contains the radial shape family, while base_family contains the approximation type in circumferential direction. More...
 
InfMapType inf_map
 The coordinate mapping type of the infinite element. More...
 

Detailed Description

class FEType hides (possibly multiple) FEFamily and approximation orders, thereby enabling specialized finite element families.

Author
Benjamin S. Kirk
Date
2002 Manages the family, order, etc. parameters for a given FE.

Definition at line 179 of file fe_type.h.

Constructor & Destructor Documentation

◆ FEType() [1/2]

libMesh::FEType::FEType ( const int  o = 1,
const FEFamily  f = LAGRANGE 
)

Constructor.

Optionally takes the approximation Order and the finite element family FEFamily

Definition at line 189 of file fe_type.h.

190  :
191  order(o),
192  family(f)
193  {}
FEFamily family
The type of finite element.
Definition: fe_type.h:204
OrderWrapper order
The approximation order of the element.
Definition: fe_type.h:198

◆ FEType() [2/2]

libMesh::FEType::FEType ( const int  o = 1,
const FEFamily  f = LAGRANGE,
const int  ro = THIRD,
const FEFamily  rf = JACOBI_20_00,
const InfMapType  im = CARTESIAN 
)

Constructor.

Optionally takes the approximation Order and the finite element family FEFamily.

Note
For non-infinite elements, the order and base order are the same, as with the family and base_family. It must be so, otherwise what we switch on would change when infinite elements are not compiled in.

Definition at line 217 of file fe_type.h.

221  :
222  order(o),
223  radial_order(ro),
224  family(f),
225  radial_family(rf),
226  inf_map(im)
227  {}
FEFamily family
The type of finite element.
Definition: fe_type.h:204
OrderWrapper radial_order
The approximation order in the base of the infinite element.
Definition: fe_type.h:237
OrderWrapper order
The approximation order of the element.
Definition: fe_type.h:198
InfMapType inf_map
The coordinate mapping type of the infinite element.
Definition: fe_type.h:258
FEFamily radial_family
For InfFE, family contains the radial shape family, while base_family contains the approximation type...
Definition: fe_type.h:250

Member Function Documentation

◆ default_quadrature_order()

Order libMesh::FEType::default_quadrature_order ( ) const
Returns
The default quadrature order for this FEType. The default quadrature order is calculated assuming a polynomial of degree order and is based on integrating the mass matrix for such an element exactly.

Definition at line 333 of file fe_type.h.

References libMesh::OrderWrapper::get_order(), and order.

334 {
335  return static_cast<Order>(2*static_cast<unsigned int>(order.get_order()) + 1);
336 }
Order
defines an enum for polynomial orders.
Definition: enum_order.h:40
OrderWrapper order
The approximation order of the element.
Definition: fe_type.h:198
int get_order() const
Explicitly request the order as an int.
Definition: fe_type.h:78

◆ default_quadrature_rule()

std::unique_ptr<QBase> libMesh::FEType::default_quadrature_rule ( const unsigned int  dim,
const int  extraorder = 0 
) const
Returns
A quadrature rule of appropriate type and order for this FEType. The default quadrature rule is based on integrating the mass matrix for such an element exactly. Higher or lower degree rules can be chosen by changing the extraorder parameter.

Referenced by libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::operator()().

◆ operator!=()

bool libMesh::FEType::operator!= ( const FEType f2) const

Tests inequality.

Definition at line 280 of file fe_type.h.

281  {
282  return !(*this == f2);
283  }

◆ operator<()

bool libMesh::FEType::operator< ( const FEType f2) const

An ordering to make FEType useful as a std::map key.

Definition at line 288 of file fe_type.h.

References family, inf_map, order, radial_family, and radial_order.

289  {
290  if (order != f2.order)
291  return (order < f2.order);
292  if (family != f2.family)
293  return (family < f2.family);
294 
295 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
296  if (radial_order != f2.radial_order)
297  return (radial_order < f2.radial_order);
298  if (radial_family != f2.radial_family)
299  return (radial_family < f2.radial_family);
300  if (inf_map != f2.inf_map)
301  return (inf_map < f2.inf_map);
302 #endif // ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
303  return false;
304  }
FEFamily family
The type of finite element.
Definition: fe_type.h:204
OrderWrapper radial_order
The approximation order in the base of the infinite element.
Definition: fe_type.h:237
OrderWrapper order
The approximation order of the element.
Definition: fe_type.h:198
InfMapType inf_map
The coordinate mapping type of the infinite element.
Definition: fe_type.h:258
FEFamily radial_family
For InfFE, family contains the radial shape family, while base_family contains the approximation type...
Definition: fe_type.h:250

◆ operator==()

bool libMesh::FEType::operator== ( const FEType f2) const

Tests equality.

Definition at line 265 of file fe_type.h.

References family, inf_map, order, radial_family, and radial_order.

266  {
267  return (order == f2.order
268  && family == f2.family
269 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
270  && radial_order == f2.radial_order
271  && radial_family == f2.radial_family
272  && inf_map == f2.inf_map
273 #endif // ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
274  );
275  }
FEFamily family
The type of finite element.
Definition: fe_type.h:204
OrderWrapper radial_order
The approximation order in the base of the infinite element.
Definition: fe_type.h:237
OrderWrapper order
The approximation order of the element.
Definition: fe_type.h:198
InfMapType inf_map
The coordinate mapping type of the infinite element.
Definition: fe_type.h:258
FEFamily radial_family
For InfFE, family contains the radial shape family, while base_family contains the approximation type...
Definition: fe_type.h:250

Member Data Documentation

◆ family

FEFamily libMesh::FEType::family

The type of finite element.

The type of approximation in radial direction.

Valid types are LAGRANGE, HIERARCHIC, etc...

Valid types are JACOBI_20_00, JACOBI_30_00, etc...

Definition at line 204 of file fe_type.h.

Referenced by libMesh::FEAbstract::get_family(), libMesh::Variable::n_components(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::operator()(), operator<(), and operator==().

◆ inf_map

InfMapType libMesh::FEType::inf_map

The coordinate mapping type of the infinite element.

When the infinite elements are defined over a surface with a separable coordinate system (sphere, spheroid, ellipsoid), the infinite elements may take advantage of this fact.

Definition at line 258 of file fe_type.h.

Referenced by operator<(), and operator==().

◆ order

OrderWrapper libMesh::FEType::order

The approximation order of the element.

The approximation order in radial direction of the infinite element.

Definition at line 198 of file fe_type.h.

Referenced by default_quadrature_order(), libMesh::FEAbstract::get_order(), libMesh::Variable::n_components(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::operator()(), operator<(), operator==(), and libMesh::FEAbstract::set_fe_order().

◆ radial_family

FEFamily libMesh::FEType::radial_family

For InfFE, family contains the radial shape family, while base_family contains the approximation type in circumferential direction.

Valid types are LAGRANGE, HIERARCHIC, etc...

Definition at line 250 of file fe_type.h.

Referenced by operator<(), and operator==().

◆ radial_order

OrderWrapper libMesh::FEType::radial_order

The approximation order in the base of the infinite element.

Definition at line 237 of file fe_type.h.

Referenced by operator<(), and operator==().


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