Flow123d  DF_patch_fe_data_tables-92632e6
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
FEValues< spacedim > Class Template Reference

Calculates finite element data on the actual cell. More...

#include <fe_values.hh>

Inheritance diagram for FEValues< spacedim >:
Inheritance graph
[legend]
Collaboration diagram for FEValues< spacedim >:
Collaboration graph
[legend]

Public Member Functions

 FEValues ()
 Default constructor with postponed initialization. More...
 
template<unsigned int DIM>
 FEValues (Quadrature &_quadrature, FiniteElement< DIM > &_fe, UpdateFlags _flags)
 
 ~FEValues ()
 Correct deallocation of objects created by 'initialize' methods. More...
 
void reinit (const ElementAccessor< spacedim > &cell)
 Update cell-dependent data (gradients, Jacobians etc.) More...
 
void reinit (const Side &cell_side)
 Update cell side-dependent FE data (values, gradients). More...
 
double shape_value (const unsigned int function_no, const unsigned int point_no) const
 Return the value of the function_no-th shape function at the point_no-th quadrature point. More...
 
arma::vec::fixed< spacedim > shape_grad (const unsigned int function_no, const unsigned int point_no) const
 Return the gradient of the function_no-th shape function at the point_no-th quadrature point. More...
 
double shape_value_component (const unsigned int function_no, const unsigned int point_no, const unsigned int comp) const
 Return the value of the function_no-th shape function at the point_no-th quadrature point. More...
 
arma::vec::fixed< spacedim > shape_grad_component (const unsigned int function_no, const unsigned int point_no, const unsigned int comp) const
 Return the gradient of the function_no-th shape function at the point_no-th quadrature point. More...
 
void set_shape_value (unsigned int i_point, unsigned int i_func_comp, double val)
 
void set_shape_gradient (unsigned int i_point, unsigned int i_func_comp, arma::vec::fixed< spacedim > val)
 
double determinant (const unsigned int point_no)
 Return the relative volume change of the cell (Jacobian determinant). More...
 
double JxW (const unsigned int point_no)
 Return the product of Jacobian determinant and the quadrature weight at given quadrature point. More...
 
arma::vec::fixed< spacedim > point (const unsigned int point_no)
 Return coordinates of the quadrature point in the actual cell system. More...
 
const Armor::arraypoint_list () const
 Return coordinates of all quadrature points in the actual cell system. More...
 
arma::vec::fixed< spacedim > normal_vector (unsigned int point_no)
 Returns the normal vector to a side at given quadrature point. More...
 
- Public Member Functions inherited from FEValuesBase< FEValues< 3 >, 3 >
 FEValuesBase ()
 Default constructor with postponed initialization. More...
 
void initialize (Quadrature &_quadrature, FiniteElement< DIM > &_fe, UpdateFlags _flags)
 Initialize structures and calculates cell-independent data. More...
 
void allocate (Quadrature &_quadrature, FiniteElement< DIM > &_fe, UpdateFlags flags)
 Allocates space for computed data. More...
 
unsigned int n_points () const
 Returns the number of quadrature points. More...
 
unsigned int n_dofs () const
 Returns the number of shape functions. More...
 
unsigned int dim () const
 Return dimension of reference space. More...
 
const FEValuesViews::Scalar< FEValues< 3 >, spacedim > & scalar_view (unsigned int i) const
 Accessor to scalar values of multicomponent FE. More...
 
const FEValuesViews::Vector< FEValues< 3 >, spacedim > & vector_view (unsigned int i) const
 Accessor to vector values of multicomponent FE. More...
 
const FEValuesViews::Tensor< FEValues< 3 >, spacedim > & tensor_view (unsigned int i) const
 Accessor to tensor values of multicomponent FE. More...
 

Protected Member Functions

void allocate_in (unsigned int q_dim) override
 Implement FEValuesBase::allocate_in. More...
 
void initialize_in (Quadrature &q, unsigned int dim) override
 Implement FEValuesBase::initialize_in. More...
 
void init_fe_val_vec () override
 Implement FEValuesBase::initialize_in. More...
 
- Protected Member Functions inherited from FEValuesBase< FEValues< 3 >, 3 >
void fill_data (const ElementValues< spacedim > &elm_values, const FEInternalData &fe_data)
 Computes the shape function values and gradients on the actual cell and fills the FEValues structure. More...
 
void fill_data_specialized (const ElementValues< spacedim > &elm_values, const FEInternalData &fe_data)
 Computes the shape function values and gradients on the actual cell and fills the FEValues structure. Specialized variant of previous method for different FETypes given by template parameter. More...
 
std::shared_ptr< FEInternalDatainit_fe_data (const FiniteElement< DIM > &fe, const Quadrature &q)
 Precompute finite element data on reference element. More...
 

Protected Attributes

std::vector< std::vector< double > > shape_values_
 Shape functions evaluated at the quadrature points. More...
 
std::vector< std::vector< arma::vec::fixed< spacedim > > > shape_gradients_
 
std::shared_ptr< ElementValues< spacedim > > elm_values_
 Auxiliary object for calculation of element-dependent data. More...
 
- Protected Attributes inherited from FEValuesBase< FEValues< 3 >, 3 >
unsigned int dim_
 Dimension of reference space. More...
 
unsigned int n_points_
 Number of integration points. More...
 
unsigned int n_dofs_
 Number of finite element dofs. More...
 
FEType fe_type_
 Type of finite element (scalar, vector, tensor). More...
 
std::vector< std::vector< unsigned int > > fe_sys_dofs_
 Dof indices of FESystem sub-elements. More...
 
std::vector< unsigned int > fe_sys_n_components_
 Numbers of components of FESystem sub-elements in reference space. More...
 
std::vector< unsigned int > fe_sys_n_space_components_
 Numbers of components of FESystem sub-elements in real space. More...
 
UpdateFlags update_flags
 Flags that indicate which finite element quantities are to be computed. More...
 
std::vector< FEValues< 3 > > fe_values_vec
 Vector of FEValues for sub-elements of FESystem. More...
 
unsigned int n_components_
 Number of components of the FE. More...
 
ViewsCache views_cache_
 Auxiliary storage of FEValuesViews accessors. More...
 
std::shared_ptr< FEInternalDatafe_data_
 Precomputed finite element data. More...
 
std::vector< shared_ptr< FEInternalData > > side_fe_data_
 Precomputed FE data (shape functions on reference element) for all side quadrature points. More...
 
FEValues< 3 > * fv_
 Helper object, we need its for ViewsCache initialization. More...
 

Friends

class MapScalar< FEValues< spacedim >, spacedim >
 
class MapPiola< FEValues< spacedim >, spacedim >
 
class MapContravariant< FEValues< spacedim >, spacedim >
 
class MapVector< FEValues< spacedim >, spacedim >
 
class MapTensor< FEValues< spacedim >, spacedim >
 
class MapSystem< FEValues< spacedim >, spacedim >
 

Detailed Description

template<unsigned int spacedim = 3>
class FEValues< spacedim >

Calculates finite element data on the actual cell.

FEValues takes care of the calculation of finite element data on the actual cell or on its side, (values of shape functions at quadrature points, gradients of shape functions, Jacobians of the mapping from the reference cell etc.).

Parameters
spacedimDimension of the Euclidean space where the actual cell lives.

Definition at line 288 of file fe_values.hh.

Constructor & Destructor Documentation

◆ FEValues() [1/2]

template<unsigned int spacedim>
FEValues< spacedim >::FEValues

Default constructor with postponed initialization.

Definition at line 309 of file fe_values.cc.

◆ FEValues() [2/2]

template<unsigned int spacedim = 3>
template<unsigned int DIM>
FEValues< spacedim >::FEValues ( Quadrature _quadrature,
FiniteElement< DIM > &  _fe,
UpdateFlags  _flags 
)
inline

Constructor with initialization of data structures (see initialize() for description of parameters).

Definition at line 298 of file fe_values.hh.

◆ ~FEValues()

template<unsigned int spacedim>
FEValues< spacedim >::~FEValues

Correct deallocation of objects created by 'initialize' methods.

Definition at line 314 of file fe_values.cc.

Member Function Documentation

◆ allocate_in()

template<unsigned int spacedim = 3>
void FEValues< spacedim >::allocate_in ( unsigned int  q_dim)
overrideprotectedvirtual

Implement FEValuesBase::allocate_in.

Implements FEValuesBase< FEValues< 3 >, 3 >.

Definition at line 329 of file fe_values.cc.

◆ determinant()

template<unsigned int spacedim = 3>
double FEValues< spacedim >::determinant ( const unsigned int  point_no)
inline

Return the relative volume change of the cell (Jacobian determinant).

If dim_==spacedim then the sign may be negative, otherwise the result is a positive number.

Parameters
point_noNumber of the quadrature point.

Definition at line 410 of file fe_values.hh.

◆ init_fe_val_vec()

template<unsigned int spacedim = 3>
void FEValues< spacedim >::init_fe_val_vec ( )
inlineoverrideprotectedvirtual

Implement FEValuesBase::initialize_in.

Implements FEValuesBase< FEValues< 3 >, 3 >.

Definition at line 472 of file fe_values.hh.

◆ initialize_in()

template<unsigned int spacedim>
void FEValues< spacedim >::initialize_in ( Quadrature q,
unsigned int  dim 
)
overrideprotectedvirtual

Implement FEValuesBase::initialize_in.

Implements FEValuesBase< FEValues< 3 >, 3 >.

Definition at line 319 of file fe_values.cc.

◆ JxW()

template<unsigned int spacedim = 3>
double FEValues< spacedim >::JxW ( const unsigned int  point_no)
inline

Return the product of Jacobian determinant and the quadrature weight at given quadrature point.

Parameters
point_noNumber of the quadrature point.

Definition at line 422 of file fe_values.hh.

Here is the caller graph for this function:

◆ normal_vector()

template<unsigned int spacedim = 3>
arma::vec::fixed<spacedim> FEValues< spacedim >::normal_vector ( unsigned int  point_no)
inline

Returns the normal vector to a side at given quadrature point.

Parameters
point_noNumber of the quadrature point.

Definition at line 456 of file fe_values.hh.

Here is the caller graph for this function:

◆ point()

template<unsigned int spacedim = 3>
arma::vec::fixed<spacedim> FEValues< spacedim >::point ( const unsigned int  point_no)
inline

Return coordinates of the quadrature point in the actual cell system.

Parameters
point_noNumber of the quadrature point.

Definition at line 435 of file fe_values.hh.

Here is the caller graph for this function:

◆ point_list()

template<unsigned int spacedim = 3>
const Armor::array& FEValues< spacedim >::point_list ( ) const
inline

Return coordinates of all quadrature points in the actual cell system.

Definition at line 445 of file fe_values.hh.

◆ reinit() [1/2]

template<unsigned int spacedim>
void FEValues< spacedim >::reinit ( const ElementAccessor< spacedim > &  cell)

Update cell-dependent data (gradients, Jacobians etc.)

Parameters
cellThe actual cell.

Definition at line 560 of file fe_values.cc.

Here is the caller graph for this function:

◆ reinit() [2/2]

template<unsigned int spacedim>
void FEValues< spacedim >::reinit ( const Side cell_side)

Update cell side-dependent FE data (values, gradients).

Parameters
cell_sideAccessor to cell side.

Definition at line 575 of file fe_values.cc.

◆ set_shape_gradient()

template<unsigned int spacedim = 3>
void FEValues< spacedim >::set_shape_gradient ( unsigned int  i_point,
unsigned int  i_func_comp,
arma::vec::fixed< spacedim >  val 
)
inline

Set shape gradient val of the i_point and i_func_comp.

Definition at line 397 of file fe_values.hh.

◆ set_shape_value()

template<unsigned int spacedim = 3>
void FEValues< spacedim >::set_shape_value ( unsigned int  i_point,
unsigned int  i_func_comp,
double  val 
)
inline

Set shape value val of the i_point and i_func_comp.

Definition at line 389 of file fe_values.hh.

◆ shape_grad()

template<unsigned int spacedim = 3>
arma::vec::fixed<spacedim> FEValues< spacedim >::shape_grad ( const unsigned int  function_no,
const unsigned int  point_no 
) const
inline

Return the gradient of the function_no-th shape function at the point_no-th quadrature point.

Parameters
function_noNumber of the shape function.
point_noNumber of the quadrature point.

Definition at line 347 of file fe_values.hh.

◆ shape_grad_component()

template<unsigned int spacedim>
arma::vec::fixed< spacedim > FEValues< spacedim >::shape_grad_component ( const unsigned int  function_no,
const unsigned int  point_no,
const unsigned int  comp 
) const

Return the gradient of the function_no-th shape function at the point_no-th quadrature point.

For vectorial finite elements.

Parameters
function_noNumber of the shape function.
point_noNumber of the quadrature point.

Definition at line 343 of file fe_values.cc.

◆ shape_value()

template<unsigned int spacedim = 3>
double FEValues< spacedim >::shape_value ( const unsigned int  function_no,
const unsigned int  point_no 
) const
inline

Return the value of the function_no-th shape function at the point_no-th quadrature point.

Parameters
function_noNumber of the shape function.
point_noNumber of the quadrature point.

Definition at line 332 of file fe_values.hh.

◆ shape_value_component()

template<unsigned int spacedim = 3>
double FEValues< spacedim >::shape_value_component ( const unsigned int  function_no,
const unsigned int  point_no,
const unsigned int  comp 
) const
inline

Return the value of the function_no-th shape function at the point_no-th quadrature point.

For vectorial finite elements.

Parameters
function_noNumber of the shape function.
point_noNumber of the quadrature point.

Definition at line 363 of file fe_values.hh.

Friends And Related Function Documentation

◆ MapContravariant< FEValues< spacedim >, spacedim >

template<unsigned int spacedim = 3>
friend class MapContravariant< FEValues< spacedim >, spacedim >
friend

Definition at line 483 of file fe_values.hh.

◆ MapPiola< FEValues< spacedim >, spacedim >

template<unsigned int spacedim = 3>
friend class MapPiola< FEValues< spacedim >, spacedim >
friend

Definition at line 483 of file fe_values.hh.

◆ MapScalar< FEValues< spacedim >, spacedim >

template<unsigned int spacedim = 3>
friend class MapScalar< FEValues< spacedim >, spacedim >
friend

Definition at line 483 of file fe_values.hh.

◆ MapSystem< FEValues< spacedim >, spacedim >

template<unsigned int spacedim = 3>
friend class MapSystem< FEValues< spacedim >, spacedim >
friend

Definition at line 483 of file fe_values.hh.

◆ MapTensor< FEValues< spacedim >, spacedim >

template<unsigned int spacedim = 3>
friend class MapTensor< FEValues< spacedim >, spacedim >
friend

Definition at line 483 of file fe_values.hh.

◆ MapVector< FEValues< spacedim >, spacedim >

template<unsigned int spacedim = 3>
friend class MapVector< FEValues< spacedim >, spacedim >
friend

Definition at line 483 of file fe_values.hh.

Member Data Documentation

◆ elm_values_

template<unsigned int spacedim = 3>
std::shared_ptr<ElementValues<spacedim> > FEValues< spacedim >::elm_values_
protected

Auxiliary object for calculation of element-dependent data.

Definition at line 483 of file fe_values.hh.

◆ shape_gradients_

template<unsigned int spacedim = 3>
std::vector<std::vector<arma::vec::fixed<spacedim> > > FEValues< spacedim >::shape_gradients_
protected

Gradients of shape functions evaluated at the quadrature points. Each row of the matrix contains the gradient of one shape function.

Definition at line 480 of file fe_values.hh.

◆ shape_values_

template<unsigned int spacedim = 3>
std::vector<std::vector<double> > FEValues< spacedim >::shape_values_
protected

Shape functions evaluated at the quadrature points.

Definition at line 476 of file fe_values.hh.


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