deal2lkit: A ToolKit library for Deal.II
FEValuesCache< dim, spacedim > Class Template Reference

#include <fe_values_cache.h>

Public Member Functions

 FEValuesCache (const Mapping< dim, spacedim > &mapping, const FiniteElement< dim, spacedim > &fe, const Quadrature< dim > &quadrature, const UpdateFlags &update_flags, const Quadrature< dim-1 > &face_quadrature, const UpdateFlags &face_update_flags)
 Explicit constructor. More...
 
 FEValuesCache (const FEValuesCache< dim, spacedim > &scratch)
 Deep copy constructor. More...
 
void reinit (const typename DoFHandler< dim, spacedim >::active_cell_iterator &cell)
 Initialize the internal FEValues to use the given cell. More...
 
void reinit (const typename DoFHandler< dim, spacedim >::active_cell_iterator &cell, const unsigned int face_no)
 Initialize the internal FEFaceValues to use the given on the given cell. More...
 
void reinit (const typename DoFHandler< dim, spacedim >::active_cell_iterator &cell, const unsigned int face_no, const unsigned int subface_no)
 Initialize the internal FESubFaceValues to use the given , on , on the given cell. More...
 
AnyDataget_cache ()
 Get the reference to cache. More...
 
const FEValuesBase< dim, spacedim > & get_current_fe_values ()
 Get the currently initialized FEValues. More...
 
template<typename Number >
std::vector< Number > & get_current_independent_local_dofs (const std::string &prefix, Number dummy)
 
const std::vector< Point< spacedim > > & get_quadrature_points ()
 Return the quadrature points of the internal FEValues object. More...
 
const std::vector< double > & get_JxW_values ()
 Return the JxW values of the internal FEValues object. More...
 
template<class STREAM >
void print_info (STREAM &os)
 Print the content of the internal cache. More...
 
template<typename VEC , typename Number >
void cache_local_solution_vector (const std::string &prefix, const VEC &input_vector, const Number dummy)
 Store internally the independent local dof values associated with the internally initialized cell. More...
 
template<typename Number >
const std::vector< std::vector< Number > > & get_values (const std::string &prefix, const Number dummy)
 Return the values of the named cached solution vector. More...
 
template<typename Number >
const std::vector< Number > & get_values (const std::string &prefix, const std::string &additional_prefix, const FEValuesExtractors::Scalar &variable, const Number dummy)
 Return the values of the named cached solution vector. More...
 
template<typename Number >
const std::vector< Tensor< 1, spacedim, Number > > & get_values (const std::string &prefix, const std::string &additional_prefix, const FEValuesExtractors::Vector &vector_variable, const Number dummy)
 Return the values of the named cached solution vector. More...
 
template<typename Number >
const std::vector< Number > & get_divergences (const std::string &prefix, const std::string &additional_prefix, const FEValuesExtractors::Vector &vector_variable, const Number dummy)
 Return the divergence of the named cached solution vector. More...
 
template<typename Number >
const std::vector< Tensor< 1, spacedim, Number > > & get_gradients (const std::string &prefix, const std::string &additional_prefix, const FEValuesExtractors::Scalar &variable, const Number dummy)
 Return the gradient of the named cached solution vector. More...
 
template<typename Number >
const std::vector< Tensor< 2, spacedim, Number > > & get_gradients (const std::string &prefix, const std::string &additional_prefix, const FEValuesExtractors::Vector &variable, const Number dummy)
 Return the gradient of the named cached solution vector. More...
 
template<typename Number >
const std::vector< Tensor< 1,(spacedim > 2 ? spacedim :1), Number > > & get_curls (const std::string &prefix, const std::string &additional_prefix, const FEValuesExtractors::Vector &variable, const Number dummy)
 Return the curl of the named cached solution vector. More...
 
template<typename Number >
const std::vector< Number > & get_laplacians (const std::string &prefix, const std::string &additional_prefix, const FEValuesExtractors::Scalar &variable, const Number dummy)
 Return the laplacian of the named cached solution vector. More...
 
template<typename Number >
const std::vector< Tensor< 1, spacedim, Number > > & get_laplacians (const std::string &prefix, const std::string &additional_prefix, const FEValuesExtractors::Vector &variable, const Number dummy)
 Return the laplacian of the named cached solution vector. More...
 
template<typename Number >
const std::vector< Tensor< 2, spacedim, Number > > & get_deformation_gradients (const std::string &prefix, const std::string &additional_prefix, const FEValuesExtractors::Vector &variable, const Number dummy)
 Return the deformation gradient of the named cached solution vector. More...
 
template<typename Number >
const std::vector< Tensor< 2, spacedim, Number > > & get_symmetric_gradients (const std::string &prefix, const std::string &additional_prefix, const FEValuesExtractors::Vector &variable, const Number dummy)
 Return the symmetric gradient of the named cached solution vector. More...
 
template<typename Number >
const std::vector< Tensor< 2, spacedim, Number > > & get_hessians (const std::string &prefix, const std::string &additional_prefix, const FEValuesExtractors::Scalar &variable, const Number dummy)
 Return the hessian of the named cached solution vector. More...
 
template<typename Number >
const std::vector< Tensor< 3, spacedim, Number > > & get_hessians (const std::string &prefix, const std::string &additional_prefix, const FEValuesExtractors::Vector &variable, const Number dummy)
 Return the hessian of the named cached solution vector. More...
 

Private Attributes

AnyData cache
 
FEValues< dim, spacedim > fe_values
 
FEFaceValues< dim, spacedim > fe_face_values
 
FESubfaceValues< dim, spacedim > fe_subface_values
 
std::vector< types::global_dof_indexlocal_dof_indices
 

Detailed Description

template<int dim, int spacedim = dim>
class FEValuesCache< dim, spacedim >

Definition at line 28 of file fe_values_cache.h.

Constructor & Destructor Documentation

§ FEValuesCache() [1/2]

template<int dim, int spacedim = dim>
FEValuesCache< dim, spacedim >::FEValuesCache ( const Mapping< dim, spacedim > &  mapping,
const FiniteElement< dim, spacedim > &  fe,
const Quadrature< dim > &  quadrature,
const UpdateFlags update_flags,
const Quadrature< dim-1 > &  face_quadrature,
const UpdateFlags face_update_flags 
)
inline

Explicit constructor.

Definition at line 34 of file fe_values_cache.h.

§ FEValuesCache() [2/2]

template<int dim, int spacedim = dim>
FEValuesCache< dim, spacedim >::FEValuesCache ( const FEValuesCache< dim, spacedim > &  scratch)
inline

Deep copy constructor.

Definition at line 50 of file fe_values_cache.h.

Member Function Documentation

§ cache_local_solution_vector()

template<int dim, int spacedim = dim>
template<typename VEC , typename Number >
void FEValuesCache< dim, spacedim >::cache_local_solution_vector ( const std::string &  prefix,
const VEC &  input_vector,
const Number  dummy 
)
inline

Store internally the independent local dof values associated with the internally initialized cell.

Before you call this function, you have to make sure you have previously called the function reinit(cell).

At every call of this function, a new vector of dof values is generated and stored internally, unless a previous vector with the same name is found. If this is the case, the content of that vector is overwritten.

If you give a unique prefix, then for each cell you are guaranteed you get a unique vector of independent dofs of the same type as the dummy variable. DOFUtilities is used to initialize the variables, so if you use a Sacado type, this will automatically initialize the derivatives inside the vector.

Definition at line 197 of file fe_values_cache.h.

§ get_cache()

template<int dim, int spacedim = dim>
AnyData& FEValuesCache< dim, spacedim >::get_cache ( )
inline

Get the reference to cache.

Returns
reference to cache.

Definition at line 109 of file fe_values_cache.h.

§ get_curls()

template<int dim, int spacedim = dim>
template<typename Number >
const std::vector<Tensor<1, (spacedim > 2 ? spacedim : 1), Number> >& FEValuesCache< dim, spacedim >::get_curls ( const std::string &  prefix,
const std::string &  additional_prefix,
const FEValuesExtractors::Vector variable,
const Number  dummy 
)
inline

Return the curl of the named cached solution vector.

Before you call this function, you have to make sure you have previously called the function cache_local_solution_vector with the same prefix you give here and with the same dummy type you use here.

Definition at line 442 of file fe_values_cache.h.

§ get_current_fe_values()

template<int dim, int spacedim = dim>
const FEValuesBase<dim,spacedim>& FEValuesCache< dim, spacedim >::get_current_fe_values ( )
inline

Get the currently initialized FEValues.

This function will return the internal FEValues if the reinit(cell) function was called last. If the reinit(cell, face_no) function was called, then this function returns the internal FEFaceValues.

Definition at line 121 of file fe_values_cache.h.

§ get_current_independent_local_dofs()

template<int dim, int spacedim = dim>
template<typename Number >
std::vector<Number>& FEValuesCache< dim, spacedim >::get_current_independent_local_dofs ( const std::string &  prefix,
Number  dummy 
)
inline

Definition at line 137 of file fe_values_cache.h.

§ get_deformation_gradients()

template<int dim, int spacedim = dim>
template<typename Number >
const std::vector<Tensor<2, spacedim, Number> >& FEValuesCache< dim, spacedim >::get_deformation_gradients ( const std::string &  prefix,
const std::string &  additional_prefix,
const FEValuesExtractors::Vector variable,
const Number  dummy 
)
inline

Return the deformation gradient of the named cached solution vector.

Before you call this function, you have to make sure you have previously called the function cache_local_solution_vector with the same prefix you give here and with the same dummy type you use here.

Definition at line 548 of file fe_values_cache.h.

§ get_divergences()

template<int dim, int spacedim = dim>
template<typename Number >
const std::vector<Number>& FEValuesCache< dim, spacedim >::get_divergences ( const std::string &  prefix,
const std::string &  additional_prefix,
const FEValuesExtractors::Vector vector_variable,
const Number  dummy 
)
inline

Return the divergence of the named cached solution vector.

Before you call this function, you have to make sure you have previously called the function cache_local_solution_vector with the same prefix you give here and with the same dummy type you use here.

Definition at line 332 of file fe_values_cache.h.

§ get_gradients() [1/2]

template<int dim, int spacedim = dim>
template<typename Number >
const std::vector<Tensor<1, spacedim, Number> >& FEValuesCache< dim, spacedim >::get_gradients ( const std::string &  prefix,
const std::string &  additional_prefix,
const FEValuesExtractors::Scalar variable,
const Number  dummy 
)
inline

Return the gradient of the named cached solution vector.

Before you call this function, you have to make sure you have previously called the function cache_local_solution_vector with the same prefix you give here and with the same dummy type you use here.

Definition at line 370 of file fe_values_cache.h.

§ get_gradients() [2/2]

template<int dim, int spacedim = dim>
template<typename Number >
const std::vector<Tensor<2, spacedim, Number> >& FEValuesCache< dim, spacedim >::get_gradients ( const std::string &  prefix,
const std::string &  additional_prefix,
const FEValuesExtractors::Vector variable,
const Number  dummy 
)
inline

Return the gradient of the named cached solution vector.

Before you call this function, you have to make sure you have previously called the function cache_local_solution_vector with the same prefix you give here and with the same dummy type you use here.

Definition at line 407 of file fe_values_cache.h.

§ get_hessians() [1/2]

template<int dim, int spacedim = dim>
template<typename Number >
const std::vector<Tensor<2,spacedim,Number> >& FEValuesCache< dim, spacedim >::get_hessians ( const std::string &  prefix,
const std::string &  additional_prefix,
const FEValuesExtractors::Scalar variable,
const Number  dummy 
)
inline

Return the hessian of the named cached solution vector.

Before you call this function, you have to make sure you have previously called the function cache_local_solution_vector with the same prefix you give here and with the same dummy type you use here.

Definition at line 620 of file fe_values_cache.h.

§ get_hessians() [2/2]

template<int dim, int spacedim = dim>
template<typename Number >
const std::vector<Tensor<3,spacedim,Number> >& FEValuesCache< dim, spacedim >::get_hessians ( const std::string &  prefix,
const std::string &  additional_prefix,
const FEValuesExtractors::Vector variable,
const Number  dummy 
)
inline

Return the hessian of the named cached solution vector.

Vector value case.

Before you call this function, you have to make sure you have previously called the function cache_local_solution_vector with the same prefix you give here and with the same dummy type you use here.

Definition at line 655 of file fe_values_cache.h.

§ get_JxW_values()

template<int dim, int spacedim = dim>
const std::vector<double >& FEValuesCache< dim, spacedim >::get_JxW_values ( )
inline

Return the JxW values of the internal FEValues object.

Definition at line 163 of file fe_values_cache.h.

§ get_laplacians() [1/2]

template<int dim, int spacedim = dim>
template<typename Number >
const std::vector<Number>& FEValuesCache< dim, spacedim >::get_laplacians ( const std::string &  prefix,
const std::string &  additional_prefix,
const FEValuesExtractors::Scalar variable,
const Number  dummy 
)
inline

Return the laplacian of the named cached solution vector.

Before you call this function, you have to make sure you have previously called the function cache_local_solution_vector with the same prefix you give here and with the same dummy type you use here.

Definition at line 477 of file fe_values_cache.h.

§ get_laplacians() [2/2]

template<int dim, int spacedim = dim>
template<typename Number >
const std::vector<Tensor<1,spacedim,Number> >& FEValuesCache< dim, spacedim >::get_laplacians ( const std::string &  prefix,
const std::string &  additional_prefix,
const FEValuesExtractors::Vector variable,
const Number  dummy 
)
inline

Return the laplacian of the named cached solution vector.

Vector value case.

Before you call this function, you have to make sure you have previously called the function cache_local_solution_vector with the same prefix you give here and with the same dummy type you use here.

Definition at line 513 of file fe_values_cache.h.

§ get_quadrature_points()

template<int dim, int spacedim = dim>
const std::vector<Point<spacedim> >& FEValuesCache< dim, spacedim >::get_quadrature_points ( )
inline

Return the quadrature points of the internal FEValues object.

Definition at line 153 of file fe_values_cache.h.

§ get_symmetric_gradients()

template<int dim, int spacedim = dim>
template<typename Number >
const std::vector<Tensor<2, spacedim, Number> >& FEValuesCache< dim, spacedim >::get_symmetric_gradients ( const std::string &  prefix,
const std::string &  additional_prefix,
const FEValuesExtractors::Vector variable,
const Number  dummy 
)
inline

Return the symmetric gradient of the named cached solution vector.

Before you call this function, you have to make sure you have previously called the function cache_local_solution_vector with the same prefix you give here and with the same dummy type you use here.

Definition at line 585 of file fe_values_cache.h.

§ get_values() [1/3]

template<int dim, int spacedim = dim>
template<typename Number >
const std::vector<std::vector<Number> >& FEValuesCache< dim, spacedim >::get_values ( const std::string &  prefix,
const Number  dummy 
)
inline

Return the values of the named cached solution vector.

Before you call this function, you have to make sure you have previously called the function cache_local_solution_vector with the same name you give here and with the same dummy type you use here.

Definition at line 223 of file fe_values_cache.h.

§ get_values() [2/3]

template<int dim, int spacedim = dim>
template<typename Number >
const std::vector<Number>& FEValuesCache< dim, spacedim >::get_values ( const std::string &  prefix,
const std::string &  additional_prefix,
const FEValuesExtractors::Scalar variable,
const Number  dummy 
)
inline

Return the values of the named cached solution vector.

Before you call this function, you have to make sure you have previously called the function cache_local_solution_vector with the same prefix you give here and with the same dummy type you use here.

Definition at line 256 of file fe_values_cache.h.

§ get_values() [3/3]

template<int dim, int spacedim = dim>
template<typename Number >
const std::vector<Tensor <1, spacedim, Number> >& FEValuesCache< dim, spacedim >::get_values ( const std::string &  prefix,
const std::string &  additional_prefix,
const FEValuesExtractors::Vector vector_variable,
const Number  dummy 
)
inline

Return the values of the named cached solution vector.

Before you call this function, you have to make sure you have previously called the function cache_local_solution_vector with the same prefix you give here and with the same dummy type you use here.

Definition at line 294 of file fe_values_cache.h.

§ print_info()

template<int dim, int spacedim = dim>
template<class STREAM >
void FEValuesCache< dim, spacedim >::print_info ( STREAM &  os)
inline

Print the content of the internal cache.

Definition at line 173 of file fe_values_cache.h.

§ reinit() [1/3]

template<int dim, int spacedim = dim>
void FEValuesCache< dim, spacedim >::reinit ( const typename DoFHandler< dim, spacedim >::active_cell_iterator cell)
inline

Initialize the internal FEValues to use the given cell.

Definition at line 71 of file fe_values_cache.h.

§ reinit() [2/3]

template<int dim, int spacedim = dim>
void FEValuesCache< dim, spacedim >::reinit ( const typename DoFHandler< dim, spacedim >::active_cell_iterator cell,
const unsigned int  face_no 
)
inline

Initialize the internal FEFaceValues to use the given on the given cell.

Definition at line 83 of file fe_values_cache.h.

§ reinit() [3/3]

template<int dim, int spacedim = dim>
void FEValuesCache< dim, spacedim >::reinit ( const typename DoFHandler< dim, spacedim >::active_cell_iterator cell,
const unsigned int  face_no,
const unsigned int  subface_no 
)
inline

Initialize the internal FESubFaceValues to use the given , on , on the given cell.

Definition at line 96 of file fe_values_cache.h.

Member Data Documentation

§ cache

template<int dim, int spacedim = dim>
AnyData FEValuesCache< dim, spacedim >::cache
private

Definition at line 683 of file fe_values_cache.h.

§ fe_face_values

template<int dim, int spacedim = dim>
FEFaceValues<dim, spacedim> FEValuesCache< dim, spacedim >::fe_face_values
private

Definition at line 685 of file fe_values_cache.h.

§ fe_subface_values

template<int dim, int spacedim = dim>
FESubfaceValues<dim, spacedim> FEValuesCache< dim, spacedim >::fe_subface_values
private

Definition at line 686 of file fe_values_cache.h.

§ fe_values

template<int dim, int spacedim = dim>
FEValues<dim, spacedim> FEValuesCache< dim, spacedim >::fe_values
private

Definition at line 684 of file fe_values_cache.h.

§ local_dof_indices

template<int dim, int spacedim = dim>
std::vector<types::global_dof_index> FEValuesCache< dim, spacedim >::local_dof_indices
private

Definition at line 687 of file fe_values_cache.h.


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