FEType Class Reference

#include <fe_type.h>

List of all members.

Public Member Functions

 FEType (const Order o=FIRST, const FEFamily f=LAGRANGE)
 FEType (const Order o=FIRST, const FEFamily f=LAGRANGE, const Order ro=THIRD, const FEFamily rf=JACOBI_20_00, const InfMapType im=CARTESIAN)
bool operator== (const FEType &f2) const
bool operator< (const FEType &f2) const
Order default_quadrature_order () const
AutoPtr< QBasedefault_quadrature_rule (const unsigned int dim, const int extraorder=0) const

Public Attributes

Order order
FEFamily family
Order radial_order
FEFamily radial_family
InfMapType inf_map


Detailed Description

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

Definition at line 42 of file fe_type.h.


Constructor & Destructor Documentation

FEType::FEType ( const Order  o = FIRST,
const FEFamily  f = LAGRANGE 
) [inline]

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

Definition at line 52 of file fe_type.h.

00053                                       :
00054     order(o),
00055     family(f)
00056   {}

FEType::FEType ( const Order  o = FIRST,
const FEFamily  f = LAGRANGE,
const Order  ro = THIRD,
const FEFamily  rf = JACOBI_20_00,
const InfMapType  im = CARTESIAN 
) [inline]

Constructor. Optionally takes the approximation Order and the finite element family FEFamily. Note that 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 82 of file fe_type.h.

00086                                           :
00087     order(o),
00088     radial_order(ro),
00089     family(f),
00090     radial_family(rf),
00091     inf_map(im)
00092   {}


Member Function Documentation

Order FEType::default_quadrature_order (  )  const [inline]

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

References order.

Referenced by FEBase::compute_periodic_constraints(), FEBase::compute_proj_constraints(), default_quadrature_rule(), JumpErrorEstimator::estimate_error(), and Elem::volume().

00192 {
00193   return static_cast<Order>(2*static_cast<unsigned int>(order) + 1);
00194 }

AutoPtr< QBase > 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 libMeshEnums::CLOUGH, default_quadrature_order(), family, and std::max().

Referenced by ExactSolution::_compute_error(), System::calculate_norm(), FEBase::coarsened_dof_values(), ExactErrorEstimator::estimate_error(), FEMContext::FEMContext(), System::ProjectVector::operator()(), PatchRecoveryErrorEstimator::EstimateError::operator()(), and HPCoarsenTest::select_refinement().

00032 {
00033 
00034   // Clough elements have at least piecewise cubic functions
00035   if (family == CLOUGH)
00036     {
00037       // this seems ridiculous but for some reason gcc 3.3.5 wants
00038       // this when using complex numbers (spetersen 04/20/06)
00039       const unsigned int seven = 7;
00040 
00041       return AutoPtr<QBase>
00042         (new QClough(dim,
00043                      static_cast<Order>
00044                      (std::max(static_cast<unsigned int>
00045                                (this->default_quadrature_order()), seven + extraorder))));
00046     }
00047   
00048   return AutoPtr<QBase>
00049     (new QGauss(dim, static_cast<Order>(this->default_quadrature_order()
00050                                         + extraorder)));
00051 }

bool FEType::operator< ( const FEType f2  )  const [inline]

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

Definition at line 146 of file fe_type.h.

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

00147   {
00148     if (order != f2.order)
00149       return (order < f2.order);
00150     if (family != f2.family)
00151       return (family < f2.family);
00152 
00153 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
00154     if (radial_order != f2.radial_order)
00155       return (radial_order < f2.radial_order);
00156     if (radial_family != f2.radial_family)
00157       return (radial_family < f2.radial_family);
00158     if (inf_map != f2.inf_map)
00159       return (inf_map < f2.inf_map);
00160 #endif // ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
00161     return false;
00162   }

bool FEType::operator== ( const FEType f2  )  const [inline]

Tests equality

Definition at line 131 of file fe_type.h.

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

00132   {
00133     return (order == f2.order
00134             && family == f2.family
00135 #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
00136             && radial_order == f2.radial_order
00137             && radial_family == f2.radial_family
00138             && inf_map == f2.inf_map
00139 #endif // ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
00140             );
00141   }


Member Data Documentation

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

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

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

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


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

Site Created By: libMesh Developers
Last modified: November 25 2009 03:44:20.

Hosted By:
SourceForge.net Logo