libMesh
Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
libMesh::FEAbstract Class Referenceabstract

This class forms the foundation from which generic finite elements may be derived. More...

#include <fe_abstract.h>

Inheritance diagram for libMesh::FEAbstract:
[legend]

Public Member Functions

virtual ~FEAbstract ()
 Destructor. More...
 
virtual void reinit (const Elem *elem, const std::vector< Point > *const pts=nullptr, const std::vector< Real > *const weights=nullptr)=0
 This is at the core of this class. More...
 
virtual void reinit (const Elem *elem, const unsigned int side, const Real tolerance=TOLERANCE, const std::vector< Point > *const pts=nullptr, const std::vector< Real > *const weights=nullptr)=0
 Reinitializes all the physical element-dependent data based on the side of the element elem. More...
 
virtual void edge_reinit (const Elem *elem, const unsigned int edge, const Real tolerance=TOLERANCE, const std::vector< Point > *pts=nullptr, const std::vector< Real > *weights=nullptr)=0
 Reinitializes all the physical element-dependent data based on the edge of the element elem. More...
 
virtual void side_map (const Elem *elem, const Elem *side, const unsigned int s, const std::vector< Point > &reference_side_points, std::vector< Point > &reference_points)=0
 Computes the reference space quadrature points on the side of an element based on the side quadrature points. More...
 
unsigned int get_dim () const
 
const std::vector< Point > & get_xyz () const
 
const std::vector< Real > & get_JxW () const
 
const std::vector< RealGradient > & get_dxyzdxi () const
 
const std::vector< RealGradient > & get_dxyzdeta () const
 
const std::vector< RealGradient > & get_dxyzdzeta () const
 
const std::vector< RealGradient > & get_d2xyzdxi2 () const
 
const std::vector< RealGradient > & get_d2xyzdeta2 () const
 
const std::vector< RealGradient > & get_d2xyzdzeta2 () const
 
const std::vector< RealGradient > & get_d2xyzdxideta () const
 
const std::vector< RealGradient > & get_d2xyzdxidzeta () const
 
const std::vector< RealGradient > & get_d2xyzdetadzeta () const
 
const std::vector< Real > & get_dxidx () const
 
const std::vector< Real > & get_dxidy () const
 
const std::vector< Real > & get_dxidz () const
 
const std::vector< Real > & get_detadx () const
 
const std::vector< Real > & get_detady () const
 
const std::vector< Real > & get_detadz () const
 
const std::vector< Real > & get_dzetadx () const
 
const std::vector< Real > & get_dzetady () const
 
const std::vector< Real > & get_dzetadz () const
 
const std::vector< std::vector< Point > > & get_tangents () const
 
const std::vector< Point > & get_normals () const
 
const std::vector< Real > & get_curvatures () const
 
virtual void attach_quadrature_rule (QBase *q)=0
 Provides the class with the quadrature rule. More...
 
virtual unsigned int n_shape_functions () const =0
 
virtual unsigned int n_quadrature_points () const =0
 
ElemType get_type () const
 
unsigned int get_p_level () const
 
FEType get_fe_type () const
 
Order get_order () const
 
void set_fe_order (int new_order)
 Sets the base FE order of the finite element. More...
 
virtual FEContinuity get_continuity () const =0
 
virtual bool is_hierarchic () const =0
 
FEFamily get_family () const
 
const FEMapget_fe_map () const
 
void print_JxW (std::ostream &os) const
 Prints the Jacobian times the weight for each quadrature point. More...
 
virtual void print_phi (std::ostream &os) const =0
 Prints the value of each shape function at each quadrature point. More...
 
virtual void print_dphi (std::ostream &os) const =0
 Prints the value of each shape function's derivative at each quadrature point. More...
 
virtual void print_d2phi (std::ostream &os) const =0
 Prints the value of each shape function's second derivatives at each quadrature point. More...
 
void print_xyz (std::ostream &os) const
 Prints the spatial location of each quadrature point (on the physical element). More...
 
void print_info (std::ostream &os) const
 Prints all the relevant information about the current element. More...
 

Static Public Member Functions

static std::unique_ptr< FEAbstractbuild (const unsigned int dim, const FEType &type)
 Builds a specific finite element type. More...
 
static bool on_reference_element (const Point &p, const ElemType t, const Real eps=TOLERANCE)
 
static void get_refspace_nodes (const ElemType t, std::vector< Point > &nodes)
 
static void compute_node_constraints (NodeConstraints &constraints, const Elem *elem)
 Computes the nodal constraint contributions (for non-conforming adapted meshes), using Lagrange geometry. More...
 
static void compute_periodic_node_constraints (NodeConstraints &constraints, const PeriodicBoundaries &boundaries, const MeshBase &mesh, const PointLocatorBase *point_locator, const Elem *elem)
 Computes the node position constraint equation contributions (for meshes with periodic boundary conditions) More...
 
static std::string get_info ()
 Gets a string containing the reference information. More...
 
static void print_info (std::ostream &out=libMesh::out)
 Prints the reference information, by default to libMesh::out. More...
 
static unsigned int n_objects ()
 Prints the number of outstanding (created, but not yet destroyed) objects. More...
 
static void enable_print_counter_info ()
 Methods to enable/disable the reference counter output from print_info() More...
 
static void disable_print_counter_info ()
 

Protected Types

typedef std::map< std::string, std::pair< unsigned int, unsigned int > > Counts
 Data structure to log the information. More...
 

Protected Member Functions

 FEAbstract (const unsigned int dim, const FEType &fet)
 Constructor. More...
 
virtual void compute_shape_functions (const Elem *, const std::vector< Point > &)=0
 After having updated the jacobian and the transformation from local to global coordinates in FEMap::compute_map(), the first derivatives of the shape functions are transformed to global coordinates, giving dphi, dphidx, dphidy, and dphidz. More...
 
virtual bool shapes_need_reinit () const =0
 
void increment_constructor_count (const std::string &name)
 Increments the construction counter. More...
 
void increment_destructor_count (const std::string &name)
 Increments the destruction counter. More...
 

Protected Attributes

std::unique_ptr< FEMap_fe_map
 
const unsigned int dim
 The dimensionality of the object. More...
 
bool calculations_started
 Have calculations with this object already been started? Then all get_* functions should already have been called. More...
 
bool calculate_phi
 Should we calculate shape functions? More...
 
bool calculate_dphi
 Should we calculate shape function gradients? More...
 
bool calculate_d2phi
 Should we calculate shape function hessians? More...
 
bool calculate_curl_phi
 Should we calculate shape function curls? More...
 
bool calculate_div_phi
 Should we calculate shape function divergences? More...
 
bool calculate_dphiref
 Should we calculate reference shape function gradients? More...
 
FEType fe_type
 The finite element type for this object. More...
 
ElemType elem_type
 The element type the current data structures are set up for. More...
 
unsigned int _p_level
 The p refinement level the current data structures are set up for. More...
 
QBaseqrule
 A pointer to the quadrature rule employed. More...
 
bool shapes_on_quadrature
 A flag indicating if current data structures correspond to quadrature rule points. More...
 

Static Protected Attributes

static Counts _counts
 Actually holds the data. More...
 
static Threads::atomic< unsigned int > _n_objects
 The number of objects. More...
 
static Threads::spin_mutex _mutex
 Mutual exclusion object to enable thread-safe reference counting. More...
 
static bool _enable_print_counter
 Flag to control whether reference count information is printed when print_info is called. More...
 

Friends

std::ostream & operator<< (std::ostream &os, const FEAbstract &fe)
 Same as above, but allows you to print to a stream. More...
 

Detailed Description

This class forms the foundation from which generic finite elements may be derived.

In the current implementation, the templated derived class FE offers a wide variety of commonly used finite element concepts. Check there for details. Use the FEAbstract::build() method to create an object of any of the derived classes.

Note
In the present design, the number of virtual members is kept to a minimum for performance reasons, although this is not based on rigorous profiling.

All calls to static members of the FE classes should be requested through the FEInterface. This interface class approximates runtime polymorphism for the templated finite element classes. Even internal library classes, like DofMap, request the number of DOFs through this interface class. This approach also enables the co-existence of various element-based schemes.

Author
Benjamin S. Kirk
Date
2002

Definition at line 101 of file fe_abstract.h.

Member Typedef Documentation

◆ Counts

typedef std::map<std::string, std::pair<unsigned int, unsigned int> > libMesh::ReferenceCounter::Counts
protectedinherited

Data structure to log the information.

The log is identified by the class name.

Definition at line 117 of file reference_counter.h.

Constructor & Destructor Documentation

◆ FEAbstract()

libMesh::FEAbstract::FEAbstract ( const unsigned int  dim,
const FEType fet 
)
protected

Constructor.

Optionally initializes required data structures. Protected so that this base class cannot be explicitly instantiated.

◆ ~FEAbstract()

virtual libMesh::FEAbstract::~FEAbstract ( )
virtual

Destructor.

Member Function Documentation

◆ attach_quadrature_rule()

virtual void libMesh::FEAbstract::attach_quadrature_rule ( QBase q)
pure virtual

◆ build()

static std::unique_ptr<FEAbstract> libMesh::FEAbstract::build ( const unsigned int  dim,
const FEType type 
)
static

Builds a specific finite element type.

Returns
A std::unique_ptr<FEAbstract> to the FE object to prevent memory leaks.

◆ compute_node_constraints()

static void libMesh::FEAbstract::compute_node_constraints ( NodeConstraints constraints,
const Elem elem 
)
static

Computes the nodal constraint contributions (for non-conforming adapted meshes), using Lagrange geometry.

◆ compute_periodic_node_constraints()

static void libMesh::FEAbstract::compute_periodic_node_constraints ( NodeConstraints constraints,
const PeriodicBoundaries boundaries,
const MeshBase mesh,
const PointLocatorBase point_locator,
const Elem elem 
)
static

Computes the node position constraint equation contributions (for meshes with periodic boundary conditions)

◆ compute_shape_functions()

virtual void libMesh::FEAbstract::compute_shape_functions ( const Elem ,
const std::vector< Point > &   
)
protectedpure virtual

After having updated the jacobian and the transformation from local to global coordinates in FEMap::compute_map(), the first derivatives of the shape functions are transformed to global coordinates, giving dphi, dphidx, dphidy, and dphidz.

This method should rarely be re-defined in derived classes, but still should be usable for children. Therefore, keep it protected. This needs to be implemented in the derived class since this function depends on whether the shape functions are vector-valued or not.

Implemented in libMesh::FEXYZ< Dim >, libMesh::InfFE< Dim, T_radial, T_map >, libMesh::FEGenericBase< OutputType >, and libMesh::FEGenericBase< FEOutputType< T >::type >.

◆ disable_print_counter_info()

static void libMesh::ReferenceCounter::disable_print_counter_info ( )
staticinherited

◆ edge_reinit()

virtual void libMesh::FEAbstract::edge_reinit ( const Elem elem,
const unsigned int  edge,
const Real  tolerance = TOLERANCE,
const std::vector< Point > *  pts = nullptr,
const std::vector< Real > *  weights = nullptr 
)
pure virtual

Reinitializes all the physical element-dependent data based on the edge of the element elem.

The tolerance parameter is passed to the involved call to inverse_map(). By default the element data are computed at the quadrature points specified by the quadrature rule qrule, but any set of points on the reference edge element may be specified in the optional argument pts.

Implemented in libMesh::InfFE< Dim, T_radial, T_map >, libMesh::FE< Dim, T >, libMesh::FE< 2, SUBDIVISION >, libMesh::FE< Dim, HIERARCHIC >, libMesh::FE< Dim, SCALAR >, libMesh::FE< Dim, L2_LAGRANGE >, libMesh::FE< Dim, NEDELEC_ONE >, libMesh::FE< Dim, HERMITE >, libMesh::FE< Dim, CLOUGH >, libMesh::FE< Dim, MONOMIAL >, libMesh::FE< Dim, XYZ >, libMesh::FE< Dim, LAGRANGE >, libMesh::FE< Dim, L2_HIERARCHIC >, and libMesh::FE< Dim, LAGRANGE_VEC >.

◆ enable_print_counter_info()

static void libMesh::ReferenceCounter::enable_print_counter_info ( )
staticinherited

Methods to enable/disable the reference counter output from print_info()

◆ get_continuity()

virtual FEContinuity libMesh::FEAbstract::get_continuity ( ) const
pure virtual

◆ get_curvatures()

const std::vector<Real>& libMesh::FEAbstract::get_curvatures ( ) const
Returns
The curvatures for use in face integration.

Definition at line 391 of file fe_abstract.h.

References _fe_map.

392  { return this->_fe_map->get_curvatures();}
std::unique_ptr< FEMap > _fe_map
Definition: fe_abstract.h:525

◆ get_d2xyzdeta2()

const std::vector<RealGradient>& libMesh::FEAbstract::get_d2xyzdeta2 ( ) const
Returns
The second partial derivatives in eta.

Definition at line 278 of file fe_abstract.h.

References _fe_map.

279  { return this->_fe_map->get_d2xyzdeta2(); }
std::unique_ptr< FEMap > _fe_map
Definition: fe_abstract.h:525

◆ get_d2xyzdetadzeta()

const std::vector<RealGradient>& libMesh::FEAbstract::get_d2xyzdetadzeta ( ) const
Returns
The second partial derivatives in eta-zeta.

Definition at line 308 of file fe_abstract.h.

References _fe_map.

309  { return this->_fe_map->get_d2xyzdetadzeta(); }
std::unique_ptr< FEMap > _fe_map
Definition: fe_abstract.h:525

◆ get_d2xyzdxi2()

const std::vector<RealGradient>& libMesh::FEAbstract::get_d2xyzdxi2 ( ) const
Returns
The second partial derivatives in xi.

Definition at line 272 of file fe_abstract.h.

References _fe_map.

273  { return this->_fe_map->get_d2xyzdxi2(); }
std::unique_ptr< FEMap > _fe_map
Definition: fe_abstract.h:525

◆ get_d2xyzdxideta()

const std::vector<RealGradient>& libMesh::FEAbstract::get_d2xyzdxideta ( ) const
Returns
The second partial derivatives in xi-eta.

Definition at line 294 of file fe_abstract.h.

References _fe_map.

295  { return this->_fe_map->get_d2xyzdxideta(); }
std::unique_ptr< FEMap > _fe_map
Definition: fe_abstract.h:525

◆ get_d2xyzdxidzeta()

const std::vector<RealGradient>& libMesh::FEAbstract::get_d2xyzdxidzeta ( ) const
Returns
The second partial derivatives in xi-zeta.

Definition at line 302 of file fe_abstract.h.

References _fe_map.

303  { return this->_fe_map->get_d2xyzdxidzeta(); }
std::unique_ptr< FEMap > _fe_map
Definition: fe_abstract.h:525

◆ get_d2xyzdzeta2()

const std::vector<RealGradient>& libMesh::FEAbstract::get_d2xyzdzeta2 ( ) const
Returns
The second partial derivatives in zeta.

Definition at line 286 of file fe_abstract.h.

References _fe_map.

287  { return this->_fe_map->get_d2xyzdzeta2(); }
std::unique_ptr< FEMap > _fe_map
Definition: fe_abstract.h:525

◆ get_detadx()

const std::vector<Real>& libMesh::FEAbstract::get_detadx ( ) const
Returns
The deta/dx entry in the transformation matrix from physical to local coordinates.

Definition at line 338 of file fe_abstract.h.

References _fe_map.

339  { return this->_fe_map->get_detadx(); }
std::unique_ptr< FEMap > _fe_map
Definition: fe_abstract.h:525

◆ get_detady()

const std::vector<Real>& libMesh::FEAbstract::get_detady ( ) const
Returns
The deta/dy entry in the transformation matrix from physical to local coordinates.

Definition at line 345 of file fe_abstract.h.

References _fe_map.

346  { return this->_fe_map->get_detady(); }
std::unique_ptr< FEMap > _fe_map
Definition: fe_abstract.h:525

◆ get_detadz()

const std::vector<Real>& libMesh::FEAbstract::get_detadz ( ) const
Returns
The deta/dz entry in the transformation matrix from physical to local coordinates.

Definition at line 352 of file fe_abstract.h.

References _fe_map.

353  { return this->_fe_map->get_detadz(); }
std::unique_ptr< FEMap > _fe_map
Definition: fe_abstract.h:525

◆ get_dim()

unsigned int libMesh::FEAbstract::get_dim ( ) const
Returns
the dimension of this FE

Definition at line 231 of file fe_abstract.h.

References dim.

232  { return dim; }
const unsigned int dim
The dimensionality of the object.
Definition: fe_abstract.h:531

◆ get_dxidx()

const std::vector<Real>& libMesh::FEAbstract::get_dxidx ( ) const
Returns
The dxi/dx entry in the transformation matrix from physical to local coordinates.

Definition at line 317 of file fe_abstract.h.

References _fe_map.

318  { return this->_fe_map->get_dxidx(); }
std::unique_ptr< FEMap > _fe_map
Definition: fe_abstract.h:525

◆ get_dxidy()

const std::vector<Real>& libMesh::FEAbstract::get_dxidy ( ) const
Returns
The dxi/dy entry in the transformation matrix from physical to local coordinates.

Definition at line 324 of file fe_abstract.h.

References _fe_map.

325  { return this->_fe_map->get_dxidy(); }
std::unique_ptr< FEMap > _fe_map
Definition: fe_abstract.h:525

◆ get_dxidz()

const std::vector<Real>& libMesh::FEAbstract::get_dxidz ( ) const
Returns
The dxi/dz entry in the transformation matrix from physical to local coordinates.

Definition at line 331 of file fe_abstract.h.

References _fe_map.

332  { return this->_fe_map->get_dxidz(); }
std::unique_ptr< FEMap > _fe_map
Definition: fe_abstract.h:525

◆ get_dxyzdeta()

const std::vector<RealGradient>& libMesh::FEAbstract::get_dxyzdeta ( ) const
Returns
The element tangents in eta-direction at the quadrature points.

Definition at line 259 of file fe_abstract.h.

References _fe_map.

260  { return this->_fe_map->get_dxyzdeta(); }
std::unique_ptr< FEMap > _fe_map
Definition: fe_abstract.h:525

◆ get_dxyzdxi()

const std::vector<RealGradient>& libMesh::FEAbstract::get_dxyzdxi ( ) const
Returns
The element tangents in xi-direction at the quadrature points.

Definition at line 252 of file fe_abstract.h.

References _fe_map.

253  { return this->_fe_map->get_dxyzdxi(); }
std::unique_ptr< FEMap > _fe_map
Definition: fe_abstract.h:525

◆ get_dxyzdzeta()

const std::vector<RealGradient>& libMesh::FEAbstract::get_dxyzdzeta ( ) const
Returns
The element tangents in zeta-direction at the quadrature points.

Definition at line 266 of file fe_abstract.h.

References _fe_map.

267  { return _fe_map->get_dxyzdzeta(); }
std::unique_ptr< FEMap > _fe_map
Definition: fe_abstract.h:525

◆ get_dzetadx()

const std::vector<Real>& libMesh::FEAbstract::get_dzetadx ( ) const
Returns
The dzeta/dx entry in the transformation matrix from physical to local coordinates.

Definition at line 359 of file fe_abstract.h.

References _fe_map.

360  { return this->_fe_map->get_dzetadx(); }
std::unique_ptr< FEMap > _fe_map
Definition: fe_abstract.h:525

◆ get_dzetady()

const std::vector<Real>& libMesh::FEAbstract::get_dzetady ( ) const
Returns
The dzeta/dy entry in the transformation matrix from physical to local coordinates.

Definition at line 366 of file fe_abstract.h.

References _fe_map.

367  { return this->_fe_map->get_dzetady(); }
std::unique_ptr< FEMap > _fe_map
Definition: fe_abstract.h:525

◆ get_dzetadz()

const std::vector<Real>& libMesh::FEAbstract::get_dzetadz ( ) const
Returns
The dzeta/dz entry in the transformation matrix from physical to local coordinates.

Definition at line 373 of file fe_abstract.h.

References _fe_map.

374  { return this->_fe_map->get_dzetadz(); }
std::unique_ptr< FEMap > _fe_map
Definition: fe_abstract.h:525

◆ get_family()

FEFamily libMesh::FEAbstract::get_family ( ) const
Returns
The finite element family of this element.

Definition at line 455 of file fe_abstract.h.

References libMesh::FEType::family, and fe_type.

455 { return fe_type.family; }
FEFamily family
The type of finite element.
Definition: fe_type.h:204
FEType fe_type
The finite element type for this object.
Definition: fe_abstract.h:575

◆ get_fe_map()

const FEMap& libMesh::FEAbstract::get_fe_map ( ) const
Returns
The mapping object

Definition at line 460 of file fe_abstract.h.

References _fe_map.

460 { return *_fe_map.get(); }
std::unique_ptr< FEMap > _fe_map
Definition: fe_abstract.h:525

◆ get_fe_type()

FEType libMesh::FEAbstract::get_fe_type ( ) const
Returns
The FE Type (approximation order and family) of the finite element.

Definition at line 429 of file fe_abstract.h.

References fe_type.

Referenced by libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::operator()(), FETest< order, family, elem_type >::testGradU(), FETest< order, family, elem_type >::testGradUComp(), and FETest< order, family, elem_type >::testU().

429 { return fe_type; }
FEType fe_type
The finite element type for this object.
Definition: fe_abstract.h:575

◆ get_info()

static std::string libMesh::ReferenceCounter::get_info ( )
staticinherited

Gets a string containing the reference information.

◆ get_JxW()

const std::vector<Real>& libMesh::FEAbstract::get_JxW ( ) const
Returns
The element Jacobian times the quadrature weight for each quadrature point.

Definition at line 245 of file fe_abstract.h.

References _fe_map.

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

246  { return this->_fe_map->get_JxW(); }
std::unique_ptr< FEMap > _fe_map
Definition: fe_abstract.h:525

◆ get_normals()

const std::vector<Point>& libMesh::FEAbstract::get_normals ( ) const
Returns
The outward pointing normal vectors for face integration.

Definition at line 385 of file fe_abstract.h.

References _fe_map.

Referenced by libMesh::ParsedFEMFunction< T >::eval_args(), and libMesh::ParsedFEMFunction< T >::init_context().

386  { return this->_fe_map->get_normals(); }
std::unique_ptr< FEMap > _fe_map
Definition: fe_abstract.h:525

◆ get_order()

Order libMesh::FEAbstract::get_order ( ) const
Returns
The approximation order of the finite element.

Definition at line 434 of file fe_abstract.h.

References _p_level, fe_type, and libMesh::FEType::order.

434 { return static_cast<Order>(fe_type.order + _p_level); }
Order
defines an enum for polynomial orders.
Definition: enum_order.h:40
unsigned int _p_level
The p refinement level the current data structures are set up for.
Definition: fe_abstract.h:587
OrderWrapper order
The approximation order of the element.
Definition: fe_type.h:198
FEType fe_type
The finite element type for this object.
Definition: fe_abstract.h:575

◆ get_p_level()

unsigned int libMesh::FEAbstract::get_p_level ( ) const
Returns
The p refinement level that the current shape functions have been calculated for.

Definition at line 424 of file fe_abstract.h.

References _p_level.

424 { return _p_level; }
unsigned int _p_level
The p refinement level the current data structures are set up for.
Definition: fe_abstract.h:587

◆ get_refspace_nodes()

static void libMesh::FEAbstract::get_refspace_nodes ( const ElemType  t,
std::vector< Point > &  nodes 
)
static
Returns
The reference space coordinates of nodes based on the element type.

◆ get_tangents()

const std::vector<std::vector<Point> >& libMesh::FEAbstract::get_tangents ( ) const
Returns
The tangent vectors for face integration.

Definition at line 379 of file fe_abstract.h.

References _fe_map.

380  { return this->_fe_map->get_tangents(); }
std::unique_ptr< FEMap > _fe_map
Definition: fe_abstract.h:525

◆ get_type()

ElemType libMesh::FEAbstract::get_type ( ) const
Returns
The element type that the current shape functions have been calculated for. Useful in determining when shape functions must be recomputed.

Definition at line 418 of file fe_abstract.h.

References elem_type.

418 { return elem_type; }
ElemType elem_type
The element type the current data structures are set up for.
Definition: fe_abstract.h:581

◆ get_xyz()

const std::vector<Point>& libMesh::FEAbstract::get_xyz ( ) const
Returns
The xyz spatial locations of the quadrature points on the element.

Definition at line 238 of file fe_abstract.h.

References _fe_map.

Referenced by libMesh::ParsedFEMFunction< T >::eval_args(), libMesh::ParsedFEMFunction< T >::init_context(), and libMesh::GenericProjector< FFunctor, GFunctor, FValue, ProjectionAction >::operator()().

239  { return this->_fe_map->get_xyz(); }
std::unique_ptr< FEMap > _fe_map
Definition: fe_abstract.h:525

◆ increment_constructor_count()

void libMesh::ReferenceCounter::increment_constructor_count ( const std::string &  name)
protectedinherited

Increments the construction counter.

Should be called in the constructor of any derived class that will be reference counted.

Definition at line 181 of file reference_counter.h.

References libMesh::ReferenceCounter::_counts, libMesh::Quality::name(), and libMesh::Threads::spin_mtx.

Referenced by libMesh::ReferenceCountedObject< RBParametrized >::ReferenceCountedObject().

182 {
183  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
184  std::pair<unsigned int, unsigned int> & p = _counts[name];
185 
186  p.first++;
187 }
std::string name(const ElemQuality q)
static Counts _counts
Actually holds the data.
spin_mutex spin_mtx
A convenient spin mutex object which can be used for obtaining locks.

◆ increment_destructor_count()

void libMesh::ReferenceCounter::increment_destructor_count ( const std::string &  name)
protectedinherited

Increments the destruction counter.

Should be called in the destructor of any derived class that will be reference counted.

Definition at line 194 of file reference_counter.h.

References libMesh::ReferenceCounter::_counts, libMesh::Quality::name(), and libMesh::Threads::spin_mtx.

Referenced by libMesh::ReferenceCountedObject< RBParametrized >::~ReferenceCountedObject().

195 {
196  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
197  std::pair<unsigned int, unsigned int> & p = _counts[name];
198 
199  p.second++;
200 }
std::string name(const ElemQuality q)
static Counts _counts
Actually holds the data.
spin_mutex spin_mtx
A convenient spin mutex object which can be used for obtaining locks.

◆ is_hierarchic()

virtual bool libMesh::FEAbstract::is_hierarchic ( ) const
pure virtual

◆ n_objects()

static unsigned int libMesh::ReferenceCounter::n_objects ( )
staticinherited

Prints the number of outstanding (created, but not yet destroyed) objects.

Definition at line 83 of file reference_counter.h.

References libMesh::ReferenceCounter::_n_objects.

84  { return _n_objects; }
static Threads::atomic< unsigned int > _n_objects
The number of objects.

◆ n_quadrature_points()

virtual unsigned int libMesh::FEAbstract::n_quadrature_points ( ) const
pure virtual

◆ n_shape_functions()

virtual unsigned int libMesh::FEAbstract::n_shape_functions ( ) const
pure virtual

◆ on_reference_element()

static bool libMesh::FEAbstract::on_reference_element ( const Point p,
const ElemType  t,
const Real  eps = TOLERANCE 
)
static
Returns
true if the point p is located on the reference element for element type t, false otherwise. Since we are doing floating point comparisons here the parameter eps can be specified to indicate a tolerance. For example, $ x \le 1 $ becomes $ x \le 1 + \epsilon $.

◆ print_d2phi()

virtual void libMesh::FEAbstract::print_d2phi ( std::ostream &  os) const
pure virtual

Prints the value of each shape function's second derivatives at each quadrature point.

Implement in derived class since this depends on whether the element is vector-valued or not.

Implemented in libMesh::FEGenericBase< OutputType >, and libMesh::FEGenericBase< FEOutputType< T >::type >.

◆ print_dphi()

virtual void libMesh::FEAbstract::print_dphi ( std::ostream &  os) const
pure virtual

Prints the value of each shape function's derivative at each quadrature point.

Implement in derived class since this depends on whether the element is vector-valued or not.

Implemented in libMesh::FEGenericBase< OutputType >, and libMesh::FEGenericBase< FEOutputType< T >::type >.

◆ print_info() [1/2]

static void libMesh::ReferenceCounter::print_info ( std::ostream &  out = libMesh::out)
staticinherited

Prints the reference information, by default to libMesh::out.

◆ print_info() [2/2]

void libMesh::FEAbstract::print_info ( std::ostream &  os) const

Prints all the relevant information about the current element.

◆ print_JxW()

void libMesh::FEAbstract::print_JxW ( std::ostream &  os) const

Prints the Jacobian times the weight for each quadrature point.

◆ print_phi()

virtual void libMesh::FEAbstract::print_phi ( std::ostream &  os) const
pure virtual

Prints the value of each shape function at each quadrature point.

Implement in derived class since this depends on whether the element is vector-valued or not.

Implemented in libMesh::FEGenericBase< OutputType >, and libMesh::FEGenericBase< FEOutputType< T >::type >.

◆ print_xyz()

void libMesh::FEAbstract::print_xyz ( std::ostream &  os) const

Prints the spatial location of each quadrature point (on the physical element).

◆ reinit() [1/2]

virtual void libMesh::FEAbstract::reinit ( const Elem elem,
const std::vector< Point > *const  pts = nullptr,
const std::vector< Real > *const  weights = nullptr 
)
pure virtual

This is at the core of this class.

Use this for each new element in the mesh. Reinitializes the requested physical element-dependent data based on the current element elem. By default the element data are computed at the quadrature points specified by the quadrature rule qrule, but any set of points on the reference element may be specified in the optional argument pts.

Note
The FE classes decide which data to initialize based on which accessor functions such as get_phi() or get_d2phi() have been called, so all such accessors should be called before the first reinit().

Implemented in libMesh::FEXYZ< Dim >, libMesh::FESubdivision, libMesh::InfFE< Dim, T_radial, T_map >, libMesh::FE< Dim, T >, libMesh::FE< 2, SUBDIVISION >, libMesh::FE< Dim, HIERARCHIC >, libMesh::FE< Dim, SCALAR >, libMesh::FE< Dim, L2_LAGRANGE >, libMesh::FE< Dim, NEDELEC_ONE >, libMesh::FE< Dim, HERMITE >, libMesh::FE< Dim, CLOUGH >, libMesh::FE< Dim, MONOMIAL >, libMesh::FE< Dim, XYZ >, libMesh::FE< Dim, LAGRANGE >, libMesh::FE< Dim, L2_HIERARCHIC >, and libMesh::FE< Dim, LAGRANGE_VEC >.

Referenced by FETest< order, family, elem_type >::testGradU(), FETest< order, family, elem_type >::testGradUComp(), and FETest< order, family, elem_type >::testU().

◆ reinit() [2/2]

virtual void libMesh::FEAbstract::reinit ( const Elem elem,
const unsigned int  side,
const Real  tolerance = TOLERANCE,
const std::vector< Point > *const  pts = nullptr,
const std::vector< Real > *const  weights = nullptr 
)
pure virtual

Reinitializes all the physical element-dependent data based on the side of the element elem.

The tolerance parameter is passed to the involved call to inverse_map(). By default the element data are computed at the quadrature points specified by the quadrature rule qrule, but any set of points on the reference side element may be specified in the optional argument pts.

Implemented in libMesh::FEXYZ< Dim >, libMesh::FESubdivision, libMesh::InfFE< Dim, T_radial, T_map >, libMesh::FE< Dim, T >, libMesh::FE< 2, SUBDIVISION >, libMesh::FE< Dim, HIERARCHIC >, libMesh::FE< Dim, SCALAR >, libMesh::FE< Dim, L2_LAGRANGE >, libMesh::FE< Dim, NEDELEC_ONE >, libMesh::FE< Dim, HERMITE >, libMesh::FE< Dim, CLOUGH >, libMesh::FE< Dim, MONOMIAL >, libMesh::FE< Dim, XYZ >, libMesh::FE< Dim, LAGRANGE >, libMesh::FE< Dim, L2_HIERARCHIC >, and libMesh::FE< Dim, LAGRANGE_VEC >.

◆ set_fe_order()

void libMesh::FEAbstract::set_fe_order ( int  new_order)

Sets the base FE order of the finite element.

Definition at line 439 of file fe_abstract.h.

References fe_type, and libMesh::FEType::order.

439 { fe_type.order = new_order; }
OrderWrapper order
The approximation order of the element.
Definition: fe_type.h:198
FEType fe_type
The finite element type for this object.
Definition: fe_abstract.h:575

◆ shapes_need_reinit()

virtual bool libMesh::FEAbstract::shapes_need_reinit ( ) const
protectedpure virtual

◆ side_map()

virtual void libMesh::FEAbstract::side_map ( const Elem elem,
const Elem side,
const unsigned int  s,
const std::vector< Point > &  reference_side_points,
std::vector< Point > &  reference_points 
)
pure virtual

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const FEAbstract fe 
)
friend

Same as above, but allows you to print to a stream.

Member Data Documentation

◆ _counts

Counts libMesh::ReferenceCounter::_counts
staticprotectedinherited

◆ _enable_print_counter

bool libMesh::ReferenceCounter::_enable_print_counter
staticprotectedinherited

Flag to control whether reference count information is printed when print_info is called.

Definition at line 141 of file reference_counter.h.

◆ _fe_map

std::unique_ptr<FEMap> libMesh::FEAbstract::_fe_map
protected

◆ _mutex

Threads::spin_mutex libMesh::ReferenceCounter::_mutex
staticprotectedinherited

Mutual exclusion object to enable thread-safe reference counting.

Definition at line 135 of file reference_counter.h.

◆ _n_objects

Threads::atomic<unsigned int> libMesh::ReferenceCounter::_n_objects
staticprotectedinherited

The number of objects.

Print the reference count information when the number returns to 0.

Definition at line 130 of file reference_counter.h.

Referenced by libMesh::ReferenceCounter::n_objects(), libMesh::ReferenceCounter::ReferenceCounter(), and libMesh::ReferenceCounter::~ReferenceCounter().

◆ _p_level

unsigned int libMesh::FEAbstract::_p_level
protected

The p refinement level the current data structures are set up for.

Definition at line 587 of file fe_abstract.h.

Referenced by get_order(), and get_p_level().

◆ calculate_curl_phi

bool libMesh::FEAbstract::calculate_curl_phi
mutableprotected

Should we calculate shape function curls?

Definition at line 557 of file fe_abstract.h.

Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_curl_phi().

◆ calculate_d2phi

bool libMesh::FEAbstract::calculate_d2phi
mutableprotected

◆ calculate_div_phi

bool libMesh::FEAbstract::calculate_div_phi
mutableprotected

Should we calculate shape function divergences?

Definition at line 562 of file fe_abstract.h.

Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_div_phi().

◆ calculate_dphi

bool libMesh::FEAbstract::calculate_dphi
mutableprotected

◆ calculate_dphiref

bool libMesh::FEAbstract::calculate_dphiref
mutableprotected

Should we calculate reference shape function gradients?

Definition at line 567 of file fe_abstract.h.

Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_curl_phi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phideta2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidetadzeta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidx2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxdy(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxdz(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxi2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxideta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxidzeta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidy2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidydz(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidz2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidzeta2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_div_phi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphideta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidx(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidxi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidy(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidz(), and libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidzeta().

◆ calculate_phi

bool libMesh::FEAbstract::calculate_phi
mutableprotected

Should we calculate shape functions?

Definition at line 542 of file fe_abstract.h.

Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_phi().

◆ calculations_started

bool libMesh::FEAbstract::calculations_started
mutableprotected

Have calculations with this object already been started? Then all get_* functions should already have been called.

Definition at line 537 of file fe_abstract.h.

Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_curl_phi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phideta2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidetadzeta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidx2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxdy(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxdz(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxi2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxideta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxidzeta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidy2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidydz(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidz2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidzeta2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_div_phi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphideta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidx(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidxi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidy(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidz(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidzeta(), and libMesh::FEGenericBase< FEOutputType< T >::type >::get_phi().

◆ dim

const unsigned int libMesh::FEAbstract::dim
protected

The dimensionality of the object.

Definition at line 531 of file fe_abstract.h.

Referenced by get_dim().

◆ elem_type

ElemType libMesh::FEAbstract::elem_type
protected

The element type the current data structures are set up for.

Definition at line 581 of file fe_abstract.h.

Referenced by get_type().

◆ fe_type

FEType libMesh::FEAbstract::fe_type
protected

The finite element type for this object.

Note
This should be constant for the object.

Definition at line 575 of file fe_abstract.h.

Referenced by get_family(), get_fe_type(), get_order(), and set_fe_order().

◆ qrule

QBase* libMesh::FEAbstract::qrule
protected

A pointer to the quadrature rule employed.

Definition at line 592 of file fe_abstract.h.

◆ shapes_on_quadrature

bool libMesh::FEAbstract::shapes_on_quadrature
protected

A flag indicating if current data structures correspond to quadrature rule points.

Definition at line 598 of file fe_abstract.h.


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