IBAMR  IBAMR version 0.19.
Public Types | Public Member Functions | Protected Attributes | List of all members
IBTK::FECache Class Reference

Class storing multiple libMesh::FE objects, each corresponding to a different quadrature rule. Each FE object is configured with a quadrature rule corresponding to the provided quad_key parameter. More...

#include <ibtk/FECache.h>

Public Types

using key_type = quadrature_key_type
 
using value_type = libMesh::FEBase
 

Public Member Functions

 FECache (unsigned int dim, const libMesh::FEType &fe_type, FEUpdateFlags flags)
 
value_typeoperator() (const key_type &quad_key, const libMesh::Elem *elem)
 
FEUpdateFlags getFEUpdateFlags () const
 
libMesh::FEType getFEType () const
 

Protected Attributes

const unsigned int d_dim
 
const libMesh::FEType d_fe_type
 
const FEUpdateFlags d_update_flags
 
QuadratureCache d_quadrature_cache
 
std::map< key_type, std::unique_ptr< libMesh::FEBase > > d_fes
 

Detailed Description

The Lagrangian-Eulerian interaction code uses different quadrature rules on different Elems to account for the change in size, over time, of each corresponding grid cell. Since libMesh::FE objects cache values that are independent of the current cell (such as shape function values) but dependent upon the quadrature rule, it is much more efficient to store one FE object for each quadrature rule instead of constantly recomputing, e.g., shape function values.

This class essentially provides a wrapper around std::map to manage FE objects and the quadrature rules they use. The keys are descriptions of quadrature rules.

Member Typedef Documentation

◆ key_type

Key type. Completely describes (excepting p-refinement) a libMesh quadrature rule.

◆ value_type

using IBTK::FECache::value_type = libMesh::FEBase

Type of values stored by this class that are accessible through operator[].

Constructor & Destructor Documentation

◆ FECache()

IBTK::FECache::FECache ( unsigned int  dim,
const libMesh::FEType &  fe_type,
FEUpdateFlags  flags 
)
inline

Constructor. Sets up a cache of FE objects calculating values for the given FEType argument. All cached FE objects have the same FEType.

Parameters
dimThe dimension of the FE object.
fe_typeThe libMesh FEType object describing the relevant finite element.
flagsFEUpdateFlags indicating which values should be calculated by each libMesh::FEBase object.

Member Function Documentation

◆ operator()()

FECache::value_type & IBTK::FECache::operator() ( const key_type quad_key,
const libMesh::Elem *  elem 
)
inline

Return a reference to an FE object that matches the specified quadrature rule type and order on the given element.

Parameters
quad_keya tuple of enums that completely describes a libMesh quadrature rule.
elemPointer to an element. This will be used to, if necessary, reinitialize the returned FE object.

◆ getFEUpdateFlags()

FEUpdateFlags IBTK::FECache::getFEUpdateFlags ( ) const
inline

Return the FEUpdateFlags stored by the current FECache.

◆ getFEType()

libMesh::FEType IBTK::FECache::getFEType ( ) const
inline

Return the FEType stored by the current FECache.

Member Data Documentation

◆ d_dim

const unsigned int IBTK::FECache::d_dim
protected

Dimension of the FE mesh.

◆ d_fe_type

const libMesh::FEType IBTK::FECache::d_fe_type
protected

Object describing the finite element type.

◆ d_update_flags

const FEUpdateFlags IBTK::FECache::d_update_flags
protected

Update flags for the current object.

◆ d_quadrature_cache

QuadratureCache IBTK::FECache::d_quadrature_cache
protected

Managed libMesh::Quadrature objects. These are attached to the FE objects.

◆ d_fes

std::map<key_type, std::unique_ptr<libMesh::FEBase> > IBTK::FECache::d_fes
protected

Managed libMesh::FE objects of specified dimension and family.


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