IBAMR  IBAMR version 0.19.
Public Member Functions | Private Member Functions | Private Attributes | List of all members
IBTK::FEDataInterpolation Class Reference

Class FEDataInterpolation manages data required to evaluate one or more FE field variables at a collection of points, possibly (not not necessarily) corresponding to the points of a quadrature rule.

#include <ibtk/FEDataInterpolation.h>

Public Member Functions

 FEDataInterpolation (unsigned int dim, std::shared_ptr< FEData > fe_data)
 
 ~FEDataInterpolation ()=default
 
void attachQuadratureRule (libMesh::QBase *qrule)
 
void attachQuadratureRuleFace (libMesh::QBase *qrule_face)
 
void evalQuadraturePoints ()
 
void evalQuadratureWeights ()
 
void evalQuadraturePointsFace ()
 
void evalQuadratureWeightsFace ()
 
void evalNormalsFace ()
 
const libMesh::QBase * getQrule () const
 
const libMesh::QBase * getQruleFace () const
 
const std::vector< libMesh::Point > & getQuadraturePoints () const
 
const std::vector< double > & getQuadratureWeights () const
 
const std::vector< libMesh::Point > & getQuadraturePointsFace () const
 
const std::vector< double > & getQuadratureWeightsFace () const
 
const std::vector< libMesh::Point > & getNormalsFace () const
 
const std::vector< std::vector< double > > & getPhi (const libMesh::FEType &fe_type) const
 
const std::vector< std::vector< libMesh::VectorValue< double > > > & getDphi (const libMesh::FEType &fe_type) const
 
const std::vector< std::vector< double > > & getPhiFace (const libMesh::FEType &fe_type) const
 
const std::vector< std::vector< libMesh::VectorValue< double > > > & getDphiFace (const libMesh::FEType &fe_type) const
 
void registerSystem (const libMesh::System &system, const std::vector< int > &phi_vars=std::vector< int >(1, 0), const std::vector< int > &dphi_vars=std::vector< int >(1, 0))
 Configure the class to evaluate the requested shape functions / derivatives for the given system. More...
 
size_t registerInterpolatedSystem (const libMesh::System &system, const std::vector< int > &vars=std::vector< int >(1, 0), const std::vector< int > &grad_vars=std::vector< int >(), libMesh::NumericVector< double > *system_vec=nullptr)
 Configure the class to interpolate the requested variables / gradients for the given system. More...
 
const std::vector< std::vector< std::vector< double > > > & getVarInterpolation ()
 Get the variable data for all of the systems. More...
 
const std::vector< std::vector< std::vector< libMesh::VectorValue< double > > > > & getGradVarInterpolation ()
 Get the gradient variable data for all of the systems. More...
 
void setupInterpolatedSystemDataIndexes (std::vector< size_t > &system_idxs, const std::vector< SystemData > &system_data, const libMesh::EquationSystems *const equation_systems)
 Register systems to be interpolated and get the corresponding system indices. More...
 
void setInterpolatedDataPointers (std::vector< const std::vector< double > * > &var_data, std::vector< const std::vector< libMesh::VectorValue< double > > * > &grad_var_data, const std::vector< size_t > &system_idxs, const libMesh::Elem *const elem, const unsigned int qp)
 Set up pointers to the interpolated data to be evaluated. More...
 
void init ()
 Initialize all of the data structures required to evaluate the FE shape functions, quadrature rules, etc. More...
 
void reinit (const libMesh::Elem *elem, const std::vector< libMesh::Point > *const points=nullptr, const std::vector< double > *weights=nullptr)
 Reinitialize the FE shape functions, quadrature rules, etc. for the specified element. More...
 
void reinit (const libMesh::Elem *elem, unsigned int side, double tol=libMesh::TOLERANCE, const std::vector< libMesh::Point > *points=nullptr, const std::vector< double > *weights=nullptr)
 Reinitialize the FE shape functions, quadrature rules, etc. for the specified side of the specified element. More...
 
void collectDataForInterpolation (const libMesh::Elem *elem)
 Get the local (element) data to be interpolated from the global vectors. More...
 
const boost::multi_array< double, 2 > & getElemData (const libMesh::Elem *elem, size_t system_idx)
 Provide the elemental data associated with the given system index and element. More...
 
void interpolate (const libMesh::Elem *elem)
 Interpolate FE data on the specified element. More...
 
void interpolate (const libMesh::Elem *elem, unsigned int side)
 Interpolate FE data on the specified side of the specified element. More...
 

Private Member Functions

 FEDataInterpolation ()=delete
 
 FEDataInterpolation (const FEDataInterpolation &)=delete
 
FEDataInterpolationoperator= (const FEDataInterpolation &)=delete
 
size_t getFETypeIndex (const libMesh::FEType &fe_type) const
 
void interpolateCommon (std::vector< std::vector< std::vector< double > > > &system_var_data, std::vector< std::vector< std::vector< libMesh::VectorValue< double > > > > &system_grad_var_data, const std::vector< const std::vector< std::vector< double > > * > &phi_data, const std::vector< const std::vector< std::vector< libMesh::VectorValue< double > > > * > &dphi_data)
 

Private Attributes

const unsigned int d_dim
 
std::shared_ptr< FEDatad_fe_data
 
bool d_initialized = false
 
bool d_eval_q_point = false
 
bool d_eval_JxW = false
 
bool d_eval_q_point_face = false
 
bool d_eval_JxW_face = false
 
bool d_eval_normal_face = false
 
libMesh::QBase * d_qrule = nullptr
 
libMesh::QBase * d_qrule_face = nullptr
 
const std::vector< libMesh::Point > * d_q_point = nullptr
 
const std::vector< libMesh::Point > * d_q_point_face = nullptr
 
const std::vector< double > * d_JxW = nullptr
 
const std::vector< double > * d_JxW_face = nullptr
 
const std::vector< libMesh::Point > * d_normal_face = nullptr
 
std::vector< const libMesh::System * > d_systems
 
std::vector< FEDataManager::SystemDofMapCache * > d_system_dof_map_caches
 
std::vector< std::vector< int > > d_system_all_vars
 
std::vector< std::vector< int > > d_system_vars
 
std::vector< std::vector< int > > d_system_grad_vars
 
std::vector< std::vector< size_t > > d_system_var_idx
 
std::vector< std::vector< size_t > > d_system_grad_var_idx
 
std::vector< libMesh::NumericVector< double > * > d_system_vecs
 
std::vector< std::vector< size_t > > d_system_var_fe_type_idx
 
std::vector< std::vector< size_t > > d_system_grad_var_fe_type_idx
 
std::vector< std::vector< std::vector< double > > > d_system_var_data
 
std::vector< std::vector< std::vector< libMesh::VectorValue< double > > > > d_system_grad_var_data
 
std::vector< const libMesh::System * > d_noninterp_systems
 
std::vector< std::vector< int > > d_noninterp_system_all_vars
 
std::vector< std::vector< int > > d_noninterp_system_phi_vars
 
std::vector< std::vector< int > > d_noninterp_system_dphi_vars
 
std::vector< libMesh::FEType > d_fe_types
 
std::vector< std::unique_ptr< IBTK::FEValuesBase > > d_fe
 
std::vector< std::unique_ptr< libMesh::FEBase > > d_fe_face
 
std::vector< boold_eval_phi
 
std::vector< boold_eval_dphi
 
std::vector< const std::vector< std::vector< double > > * > d_phi
 
std::vector< const std::vector< std::vector< double > > * > d_phi_face
 
std::vector< const std::vector< std::vector< libMesh::VectorValue< double > > > * > d_dphi
 
std::vector< const std::vector< std::vector< libMesh::VectorValue< double > > > * > d_dphi_face
 
const libMesh::Elem * d_current_elem = nullptr
 
unsigned int d_current_side = std::numeric_limits<unsigned int>::max()
 
std::vector< boost::multi_array< double, 2 > > d_system_elem_data
 
unsigned int d_n_qp = std::numeric_limits<unsigned int>::max()
 

Constructor & Destructor Documentation

◆ FEDataInterpolation() [1/3]

IBTK::FEDataInterpolation::FEDataInterpolation ( unsigned int  dim,
std::shared_ptr< FEData fe_data 
)

◆ ~FEDataInterpolation()

IBTK::FEDataInterpolation::~FEDataInterpolation ( )
default

◆ FEDataInterpolation() [2/3]

IBTK::FEDataInterpolation::FEDataInterpolation ( )
privatedelete

◆ FEDataInterpolation() [3/3]

IBTK::FEDataInterpolation::FEDataInterpolation ( const FEDataInterpolation )
privatedelete

Member Function Documentation

◆ attachQuadratureRule()

void IBTK::FEDataInterpolation::attachQuadratureRule ( libMesh::QBase *  qrule)
inline

◆ attachQuadratureRuleFace()

void IBTK::FEDataInterpolation::attachQuadratureRuleFace ( libMesh::QBase *  qrule_face)
inline

◆ evalQuadraturePoints()

void IBTK::FEDataInterpolation::evalQuadraturePoints ( )
inline

◆ evalQuadratureWeights()

void IBTK::FEDataInterpolation::evalQuadratureWeights ( )
inline

◆ evalQuadraturePointsFace()

void IBTK::FEDataInterpolation::evalQuadraturePointsFace ( )
inline

◆ evalQuadratureWeightsFace()

void IBTK::FEDataInterpolation::evalQuadratureWeightsFace ( )
inline

◆ evalNormalsFace()

void IBTK::FEDataInterpolation::evalNormalsFace ( )
inline

◆ getQrule()

const libMesh::QBase* IBTK::FEDataInterpolation::getQrule ( ) const
inline

◆ getQruleFace()

const libMesh::QBase* IBTK::FEDataInterpolation::getQruleFace ( ) const
inline

◆ getQuadraturePoints()

const std::vector<libMesh::Point>& IBTK::FEDataInterpolation::getQuadraturePoints ( ) const
inline

◆ getQuadratureWeights()

const std::vector<double>& IBTK::FEDataInterpolation::getQuadratureWeights ( ) const
inline

◆ getQuadraturePointsFace()

const std::vector<libMesh::Point>& IBTK::FEDataInterpolation::getQuadraturePointsFace ( ) const
inline

◆ getQuadratureWeightsFace()

const std::vector<double>& IBTK::FEDataInterpolation::getQuadratureWeightsFace ( ) const
inline

◆ getNormalsFace()

const std::vector<libMesh::Point>& IBTK::FEDataInterpolation::getNormalsFace ( ) const
inline

◆ getPhi()

const std::vector<std::vector<double> >& IBTK::FEDataInterpolation::getPhi ( const libMesh::FEType &  fe_type) const
inline

◆ getDphi()

const std::vector<std::vector<libMesh::VectorValue<double> > >& IBTK::FEDataInterpolation::getDphi ( const libMesh::FEType &  fe_type) const
inline

◆ getPhiFace()

const std::vector<std::vector<double> >& IBTK::FEDataInterpolation::getPhiFace ( const libMesh::FEType &  fe_type) const
inline

◆ getDphiFace()

const std::vector<std::vector<libMesh::VectorValue<double> > >& IBTK::FEDataInterpolation::getDphiFace ( const libMesh::FEType &  fe_type) const
inline

◆ registerSystem()

void IBTK::FEDataInterpolation::registerSystem ( const libMesh::System &  system,
const std::vector< int > &  phi_vars = std::vector< int >(1, 0),
const std::vector< int > &  dphi_vars = std::vector< int >(1, 0) 
)

NOTE: To interpolate variables associated with the system, use registerInterpolatedSystem().

◆ registerInterpolatedSystem()

size_t IBTK::FEDataInterpolation::registerInterpolatedSystem ( const libMesh::System &  system,
const std::vector< int > &  vars = std::vector< int >(1, 0),
const std::vector< int > &  grad_vars = std::vector< int >(),
libMesh::NumericVector< double > *  system_vec = nullptr 
)

If the system data vector is nullptr, then this class will use system.current_local_solution.

NOTE: The same system can be registered multiple times with different sets of variables/gradients and system data vectors.

Returns
Returns an index that is used to access the interpolated data.

◆ getVarInterpolation()

const std::vector<std::vector<std::vector<double> > >& IBTK::FEDataInterpolation::getVarInterpolation ( )
inline

NOTE: Data are indexed via [qp][system_idx][var_idx].

◆ getGradVarInterpolation()

const std::vector<std::vector<std::vector<libMesh::VectorValue<double> > > >& IBTK::FEDataInterpolation::getGradVarInterpolation ( )
inline

NOTE: Data are indexed via [qp][system_idx][var_idx].

◆ setupInterpolatedSystemDataIndexes()

void IBTK::FEDataInterpolation::setupInterpolatedSystemDataIndexes ( std::vector< size_t > &  system_idxs,
const std::vector< SystemData > &  system_data,
const libMesh::EquationSystems *const  equation_systems 
)

◆ setInterpolatedDataPointers()

void IBTK::FEDataInterpolation::setInterpolatedDataPointers ( std::vector< const std::vector< double > * > &  var_data,
std::vector< const std::vector< libMesh::VectorValue< double > > * > &  grad_var_data,
const std::vector< size_t > &  system_idxs,
const libMesh::Elem *const  elem,
const unsigned int  qp 
)

◆ init()

void IBTK::FEDataInterpolation::init ( )

NOTE: This method must be called before reinitializing data on individual elements.

◆ reinit() [1/2]

void IBTK::FEDataInterpolation::reinit ( const libMesh::Elem *  elem,
const std::vector< libMesh::Point > *const  points = nullptr,
const std::vector< double > *  weights = nullptr 
)

NOTE: Nodal values are set by calling collectDataForInterpolation().

◆ reinit() [2/2]

void IBTK::FEDataInterpolation::reinit ( const libMesh::Elem *  elem,
unsigned int  side,
double  tol = libMesh::TOLERANCE,
const std::vector< libMesh::Point > *  points = nullptr,
const std::vector< double > *  weights = nullptr 
)

NOTE: Nodal values are set by calling collectDataForInterpolation().

◆ collectDataForInterpolation()

void IBTK::FEDataInterpolation::collectDataForInterpolation ( const libMesh::Elem *  elem)

◆ getElemData()

const boost::multi_array<double, 2>& IBTK::FEDataInterpolation::getElemData ( const libMesh::Elem *  elem,
size_t  system_idx 
)

◆ interpolate() [1/2]

void IBTK::FEDataInterpolation::interpolate ( const libMesh::Elem *  elem)

NOTE: Nodal values are set by calling collectDataForInterpolation().

◆ interpolate() [2/2]

void IBTK::FEDataInterpolation::interpolate ( const libMesh::Elem *  elem,
unsigned int  side 
)

NOTE: Nodal values are set by calling collectDataForInterpolation().

◆ operator=()

FEDataInterpolation& IBTK::FEDataInterpolation::operator= ( const FEDataInterpolation )
privatedelete

◆ getFETypeIndex()

size_t IBTK::FEDataInterpolation::getFETypeIndex ( const libMesh::FEType &  fe_type) const
private

◆ interpolateCommon()

void IBTK::FEDataInterpolation::interpolateCommon ( std::vector< std::vector< std::vector< double > > > &  system_var_data,
std::vector< std::vector< std::vector< libMesh::VectorValue< double > > > > &  system_grad_var_data,
const std::vector< const std::vector< std::vector< double > > * > &  phi_data,
const std::vector< const std::vector< std::vector< libMesh::VectorValue< double > > > * > &  dphi_data 
)
private

Member Data Documentation

◆ d_dim

const unsigned int IBTK::FEDataInterpolation::d_dim
private

◆ d_fe_data

std::shared_ptr<FEData> IBTK::FEDataInterpolation::d_fe_data
private

◆ d_initialized

bool IBTK::FEDataInterpolation::d_initialized = false
private

◆ d_eval_q_point

bool IBTK::FEDataInterpolation::d_eval_q_point = false
private

◆ d_eval_JxW

bool IBTK::FEDataInterpolation::d_eval_JxW = false
private

◆ d_eval_q_point_face

bool IBTK::FEDataInterpolation::d_eval_q_point_face = false
private

◆ d_eval_JxW_face

bool IBTK::FEDataInterpolation::d_eval_JxW_face = false
private

◆ d_eval_normal_face

bool IBTK::FEDataInterpolation::d_eval_normal_face = false
private

◆ d_qrule

libMesh::QBase* IBTK::FEDataInterpolation::d_qrule = nullptr
private

◆ d_qrule_face

libMesh::QBase * IBTK::FEDataInterpolation::d_qrule_face = nullptr
private

◆ d_q_point

const std::vector<libMesh::Point>* IBTK::FEDataInterpolation::d_q_point = nullptr
private

◆ d_q_point_face

const std::vector<libMesh::Point> * IBTK::FEDataInterpolation::d_q_point_face = nullptr
private

◆ d_JxW

const std::vector<double>* IBTK::FEDataInterpolation::d_JxW = nullptr
private

◆ d_JxW_face

const std::vector<double> * IBTK::FEDataInterpolation::d_JxW_face = nullptr
private

◆ d_normal_face

const std::vector<libMesh::Point>* IBTK::FEDataInterpolation::d_normal_face = nullptr
private

◆ d_systems

std::vector<const libMesh::System*> IBTK::FEDataInterpolation::d_systems
private

◆ d_system_dof_map_caches

std::vector<FEDataManager::SystemDofMapCache*> IBTK::FEDataInterpolation::d_system_dof_map_caches
private

◆ d_system_all_vars

std::vector<std::vector<int> > IBTK::FEDataInterpolation::d_system_all_vars
private

◆ d_system_vars

std::vector<std::vector<int> > IBTK::FEDataInterpolation::d_system_vars
private

◆ d_system_grad_vars

std::vector<std::vector<int> > IBTK::FEDataInterpolation::d_system_grad_vars
private

◆ d_system_var_idx

std::vector<std::vector<size_t> > IBTK::FEDataInterpolation::d_system_var_idx
private

◆ d_system_grad_var_idx

std::vector<std::vector<size_t> > IBTK::FEDataInterpolation::d_system_grad_var_idx
private

◆ d_system_vecs

std::vector<libMesh::NumericVector<double>*> IBTK::FEDataInterpolation::d_system_vecs
private

◆ d_system_var_fe_type_idx

std::vector<std::vector<size_t> > IBTK::FEDataInterpolation::d_system_var_fe_type_idx
private

◆ d_system_grad_var_fe_type_idx

std::vector<std::vector<size_t> > IBTK::FEDataInterpolation::d_system_grad_var_fe_type_idx
private

◆ d_system_var_data

std::vector<std::vector<std::vector<double> > > IBTK::FEDataInterpolation::d_system_var_data
private

◆ d_system_grad_var_data

std::vector<std::vector<std::vector<libMesh::VectorValue<double> > > > IBTK::FEDataInterpolation::d_system_grad_var_data
private

◆ d_noninterp_systems

std::vector<const libMesh::System*> IBTK::FEDataInterpolation::d_noninterp_systems
private

◆ d_noninterp_system_all_vars

std::vector<std::vector<int> > IBTK::FEDataInterpolation::d_noninterp_system_all_vars
private

◆ d_noninterp_system_phi_vars

std::vector<std::vector<int> > IBTK::FEDataInterpolation::d_noninterp_system_phi_vars
private

◆ d_noninterp_system_dphi_vars

std::vector<std::vector<int> > IBTK::FEDataInterpolation::d_noninterp_system_dphi_vars
private

◆ d_fe_types

std::vector<libMesh::FEType> IBTK::FEDataInterpolation::d_fe_types
private

◆ d_fe

std::vector<std::unique_ptr<IBTK::FEValuesBase> > IBTK::FEDataInterpolation::d_fe
private

◆ d_fe_face

std::vector<std::unique_ptr<libMesh::FEBase> > IBTK::FEDataInterpolation::d_fe_face
private

◆ d_eval_phi

std::vector<bool> IBTK::FEDataInterpolation::d_eval_phi
private

◆ d_eval_dphi

std::vector<bool> IBTK::FEDataInterpolation::d_eval_dphi
private

◆ d_phi

std::vector<const std::vector<std::vector<double> >*> IBTK::FEDataInterpolation::d_phi
private

◆ d_phi_face

std::vector<const std::vector<std::vector<double> >*> IBTK::FEDataInterpolation::d_phi_face
private

◆ d_dphi

std::vector<const std::vector<std::vector<libMesh::VectorValue<double> > >*> IBTK::FEDataInterpolation::d_dphi
private

◆ d_dphi_face

std::vector<const std::vector<std::vector<libMesh::VectorValue<double> > >*> IBTK::FEDataInterpolation::d_dphi_face
private

◆ d_current_elem

const libMesh::Elem* IBTK::FEDataInterpolation::d_current_elem = nullptr
private

◆ d_current_side

unsigned int IBTK::FEDataInterpolation::d_current_side = std::numeric_limits<unsigned int>::max()
private

◆ d_system_elem_data

std::vector<boost::multi_array<double, 2> > IBTK::FEDataInterpolation::d_system_elem_data
private

◆ d_n_qp

unsigned int IBTK::FEDataInterpolation::d_n_qp = std::numeric_limits<unsigned int>::max()
private

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