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
 
UniquePtr< 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 178 of file fe_type.h.

Constructor & Destructor Documentation

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 188 of file fe_type.h.

189  :
190  order(o),
191  family(f)
192  {}
FEFamily family
The type of finite element.
Definition: fe_type.h:203
OrderWrapper order
The approximation order of the element.
Definition: fe_type.h:197
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 216 of file fe_type.h.

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

Member Function Documentation

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 332 of file fe_type.h.

Referenced by LinearElasticity::assemble(), AssembleOptimization::assemble_A_and_F(), assemble_elasticity(), assemble_ellipticdg(), assemble_poisson(), assemble_shell(), assemble_stokes(), libMesh::FEGenericBase< OutputType >::compute_periodic_constraints(), libMesh::FEGenericBase< OutputType >::compute_proj_constraints(), compute_stresses(), LinearElasticityWithContact::compute_stresses(), LinearElasticity::compute_stresses(), LargeDeformationElasticity::compute_stresses(), default_quadrature_rule(), LargeDeformationElasticity::jacobian(), LargeDeformationElasticity::residual(), LinearElasticityWithContact::residual_and_jacobian(), and libMesh::Elem::volume().

333 {
334  return static_cast<Order>(2*static_cast<unsigned int>(order.get_order()) + 1);
335 }
int get_order() const
Explicitly request the order as an int.
Definition: fe_type.h:77
OrderWrapper order
The approximation order of the element.
Definition: fe_type.h:197
Order
defines an enum for polynomial orders.
Definition: enum_order.h:32
UniquePtr< 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.

Definition at line 30 of file fe_type.C.

References libMesh::CLOUGH, default_quadrature_order(), family, std::max(), and libMesh::SUBDIVISION.

Referenced by libMesh::ExactSolution::_compute_error(), libMesh::UniformRefinementEstimator::_estimate_error(), libMesh::RBConstruction::add_scaled_matrix_and_vector(), assemble_biharmonic(), assemble_laplace(), assemble_shell(), libMesh::System::calculate_norm(), libMesh::FEGenericBase< OutputType >::coarsened_dof_values(), libMesh::ExactErrorEstimator::estimate_error(), libMesh::FEMContext::init_internal_data(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::operator()(), libMesh::WeightedPatchRecoveryErrorEstimator::EstimateError::operator()(), libMesh::PatchRecoveryErrorEstimator::EstimateError::operator()(), libMesh::BoundaryProjectSolution::operator()(), Biharmonic::JR::residual_and_jacobian(), and libMesh::HPCoarsenTest::select_refinement().

32 {
33 
34  // Clough elements have at least piecewise cubic functions
35  if (family == CLOUGH)
36  {
37  // this seems ridiculous but for some reason gcc 3.3.5 wants
38  // this when using complex numbers (spetersen 04/20/06)
39  const unsigned int seven = 7;
40 
41  return UniquePtr<QBase>
42  (new QClough(dim,
43  static_cast<Order>
44  (std::max(static_cast<unsigned int>
45  (this->default_quadrature_order()), seven + extraorder))));
46  }
47 
48  if (family == SUBDIVISION)
49  return UniquePtr<QBase>
50  (new QGauss(dim, static_cast<Order>(1 + extraorder)));
51 
52  return UniquePtr<QBase>
53  (new QGauss(dim, static_cast<Order>(this->default_quadrature_order()
54  + extraorder)));
55 }
FEFamily family
The type of finite element.
Definition: fe_type.h:203
unsigned int dim
long double max(long double a, double b)
Order default_quadrature_order() const
Definition: fe_type.h:332
bool libMesh::FEType::operator!= ( const FEType f2) const

Tests inequality.

Definition at line 279 of file fe_type.h.

280  {
281  return !(*this == f2);
282  }
bool libMesh::FEType::operator< ( const FEType f2) const

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

Definition at line 287 of file fe_type.h.

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

288  {
289  if (order != f2.order)
290  return (order < f2.order);
291  if (family != f2.family)
292  return (family < f2.family);
293 
294 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
295  if (radial_order != f2.radial_order)
296  return (radial_order < f2.radial_order);
297  if (radial_family != f2.radial_family)
298  return (radial_family < f2.radial_family);
299  if (inf_map != f2.inf_map)
300  return (inf_map < f2.inf_map);
301 #endif // ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
302  return false;
303  }
FEFamily family
The type of finite element.
Definition: fe_type.h:203
OrderWrapper radial_order
The approximation order in the base of the infinite element.
Definition: fe_type.h:236
OrderWrapper order
The approximation order of the element.
Definition: fe_type.h:197
InfMapType inf_map
The coordinate mapping type of the infinite element.
Definition: fe_type.h:257
FEFamily radial_family
For InfFE, family contains the radial shape family, while base_family contains the approximation type...
Definition: fe_type.h:249
bool libMesh::FEType::operator== ( const FEType f2) const

Tests equality.

Definition at line 264 of file fe_type.h.

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

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

Member Data Documentation

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 203 of file fe_type.h.

Referenced by libMesh::DofMap::_dof_indices(), libMesh::FEMSystem::assembly(), libMesh::FEMap::build(), libMesh::FETransformationBase< OutputShape >::build(), libMesh::FEAbstract::build(), libMesh::FEGenericBase< OutputType >::build(), libMesh::FEMContext::build_new_fe(), libMesh::WrappedFunction< Output >::component(), libMesh::FEInterface::compute_constraints(), libMesh::GMVIO::copy_nodal_solution(), default_quadrature_rule(), libMesh::DofMap::distribute_dofs(), libMesh::DofMap::distribute_local_dofs_node_major(), libMesh::DofMap::distribute_local_dofs_var_major(), libMesh::DofMap::dof_indices(), libMesh::JumpErrorEstimator::estimate_error(), libMesh::FEInterface::extra_hanging_dofs(), libMesh::FEInterface::field_type(), libMesh::FEAbstract::get_family(), libMesh::System::get_info(), libMesh::DifferentiableSystem::have_first_order_scalar_vars(), libMesh::DifferentiableSystem::have_second_order_scalar_vars(), libMesh::FEMContext::init_internal_data(), libMesh::FEInterface::max_order(), libMesh::Variable::n_components(), libMesh::FEInterface::n_vec_dim(), libMesh::DifferentiablePhysics::nonlocal_mass_residual(), libMesh::DofMap::old_dof_indices(), libMesh::WrappedFunction< Output >::operator()(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::operator()(), libMesh::BoundaryProjectSolution::operator()(), operator<(), operator==(), libMesh::System::read_header(), libMesh::DofMap::reinit(), libMesh::MeshFunctionSolutionTransfer::transfer(), and libMesh::System::write_header().

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 257 of file fe_type.h.

Referenced by libMesh::FEGenericBase< OutputType >::build_InfFE(), libMesh::System::get_info(), libMesh::FEInterface::ifem_inverse_map(), libMesh::FEInterface::ifem_map(), libMesh::FEInterface::ifem_nodal_soln(), libMesh::InfFE< Dim, T_radial, T_map >::InfFE(), operator<(), operator==(), libMesh::System::read_header(), and libMesh::System::write_header().

OrderWrapper libMesh::FEType::order

The approximation order of the element.

The approximation order in radial direction of the infinite element.

Definition at line 197 of file fe_type.h.

Referenced by libMesh::DofMap::_dof_indices(), libMesh::FEMContext::build_new_fe(), libMesh::FEGenericBase< OutputType >::coarsened_dof_values(), libMesh::FEInterface::compute_data(), libMesh::FEGenericBase< OutputType >::compute_proj_constraints(), libMesh::DofMap::constrain_p_dofs(), libMesh::GMVIO::copy_nodal_solution(), libMesh::DofMap::distribute_dofs(), libMesh::DofMap::distribute_local_dofs_node_major(), libMesh::DofMap::distribute_local_dofs_var_major(), libMesh::DofMap::dof_indices(), libMesh::FEInterface::dofs_on_edge(), libMesh::FEInterface::dofs_on_side(), libMesh::System::get_info(), libMesh::FEAbstract::get_order(), libMesh::FEMContext::init_internal_data(), libMesh::FESubdivision::init_shape_functions(), libMesh::Variable::n_components(), libMesh::FEInterface::n_dofs(), libMesh::FEInterface::n_dofs_at_node(), libMesh::FEInterface::n_dofs_per_elem(), libMesh::FEInterface::n_shape_functions(), libMesh::FEInterface::nodal_soln(), libMesh::DofMap::old_dof_indices(), libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::operator()(), libMesh::WeightedPatchRecoveryErrorEstimator::EstimateError::operator()(), libMesh::PatchRecoveryErrorEstimator::EstimateError::operator()(), operator<(), operator==(), libMesh::System::read_header(), libMesh::DofMap::reinit(), libMesh::DofMap::SCALAR_dof_indices(), libMesh::HPCoarsenTest::select_refinement(), libMesh::FEAbstract::set_fe_order(), and libMesh::FEInterface::shape().

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 249 of file fe_type.h.

Referenced by libMesh::FEGenericBase< OutputType >::build_InfFE(), libMesh::System::get_info(), libMesh::FEInterface::ifem_compute_data(), libMesh::FEInterface::ifem_nodal_soln(), libMesh::FEInterface::ifem_shape(), libMesh::InfFE< Dim, T_radial, T_map >::InfFE(), operator<(), operator==(), libMesh::System::read_header(), and libMesh::System::write_header().

OrderWrapper libMesh::FEType::radial_order

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