Flow123d
JS_before_hm-2198-g122e1f2e2
|
Calculates finite element data on the actual cell. More...
#include <fe_values.hh>
Classes | |
class | FEInternalData |
Structure for storing the precomputed finite element data. More... | |
struct | ViewsCache |
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... | |
template<unsigned int DIM> | |
void | allocate (unsigned int n_points, FiniteElement< DIM > &_fe, UpdateFlags flags) |
Allocates space for computed data. More... | |
template<unsigned int DIM> | |
void | initialize (Quadrature &_quadrature, FiniteElement< DIM > &_fe, UpdateFlags _flags) |
Initialize structures and calculates cell-independent data. 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... | |
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::array & | point_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... | |
const FEValuesViews::Scalar< spacedim > & | scalar_view (unsigned int i) const |
Accessor to scalar values of multicomponent FE. More... | |
const FEValuesViews::Vector< spacedim > & | vector_view (unsigned int i) const |
Accessor to vector values of multicomponent FE. More... | |
const FEValuesViews::Tensor< spacedim > & | tensor_view (unsigned int i) const |
Accessor to tensor values of multicomponent FE. 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... | |
template<unsigned int DIM> | |
std::shared_ptr< typename FEValues< spacedim >::FEInternalData > | init_fe_data (const FiniteElement< DIM > &fe, const Quadrature &q) |
template<class MapType > | |
void | fill_data_specialized (const ElementValues< spacedim > &elm_values, const typename FEValues< spacedim >::FEInternalData &fe_data) |
Protected Member Functions | |
template<unsigned int DIM> | |
std::shared_ptr< FEInternalData > | init_fe_data (const FiniteElement< DIM > &fe, const Quadrature &q) |
Precompute finite element data on reference element. More... | |
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... | |
template<class MapType > | |
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... | |
Protected Attributes | |
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... | |
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 |
UpdateFlags | update_flags |
Flags that indicate which finite element quantities are to be computed. More... | |
std::shared_ptr< ElementValues< spacedim > > | elm_values |
Auxiliary object for calculation of element-dependent data. More... | |
std::vector< FEValues< spacedim > > | 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< FEInternalData > | fe_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... | |
Friends | |
class | MapScalar< spacedim > |
class | MapPiola< spacedim > |
class | MapContravariant< spacedim > |
class | MapVector< spacedim > |
class | MapTensor< spacedim > |
class | MapSystem< 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.).
spacedim | Dimension of the Euclidean space where the actual cell lives. |
Definition at line 66 of file fe_values.hh.
Default constructor with postponed initialization.
Definition at line 123 of file fe_values.cc.
|
inline |
Constructor with initialization of data structures (see initialize() for description of parameters).
Definition at line 90 of file fe_values.hh.
Correct deallocation of objects created by 'initialize' methods.
Definition at line 131 of file fe_values.cc.
void FEValues< spacedim >::allocate | ( | unsigned int | n_points, |
FiniteElement< DIM > & | _fe, | ||
UpdateFlags | flags | ||
) |
Allocates space for computed data.
n_points | Number of quadrature points. |
_fe | The finite element. |
flags | The update flags. |
Definition at line 179 of file fe_values.cc.
|
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.
point_no | Number of the quadrature point. |
Definition at line 211 of file fe_values.hh.
|
inline |
Return dimension of reference space.
Definition at line 308 of file fe_values.hh.
|
protected |
Computes the shape function values and gradients on the actual cell and fills the FEValues structure.
fe_data | Precomputed finite element data. |
Definition at line 493 of file fe_values.cc.
|
protected |
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.
|
inline |
Definition at line 523 of file fe_values.cc.
std::shared_ptr<typename FEValues<spacedim>::FEInternalData> FEValues< spacedim >::init_fe_data | ( | const FiniteElement< DIM > & | fe, |
const Quadrature & | q | ||
) |
Definition at line 228 of file fe_values.cc.
|
protected |
Precompute finite element data on reference element.
void FEValues< spacedim >::initialize | ( | Quadrature & | _quadrature, |
FiniteElement< DIM > & | _fe, | ||
UpdateFlags | _flags | ||
) |
Initialize structures and calculates cell-independent data.
_quadrature | The quadrature rule for the cell associated to given finite element or for the cell side. |
_fe | The finite element. |
_flags | The update flags. |
Definition at line 137 of file fe_values.cc.
|
inline |
Return the product of Jacobian determinant and the quadrature weight at given quadrature point.
point_no | Number of the quadrature point. |
Definition at line 223 of file fe_values.hh.
|
inline |
Returns the number of shape functions.
Definition at line 302 of file fe_values.hh.
|
inline |
Returns the number of quadrature points.
Definition at line 296 of file fe_values.hh.
|
inline |
Returns the normal vector to a side at given quadrature point.
point_no | Number of the quadrature point. |
Definition at line 257 of file fe_values.hh.
|
inline |
Return coordinates of the quadrature point in the actual cell system.
point_no | Number of the quadrature point. |
Definition at line 236 of file fe_values.hh.
|
inline |
Return coordinates of all quadrature points in the actual cell system.
Definition at line 246 of file fe_values.hh.
void FEValues< spacedim >::reinit | ( | const ElementAccessor< spacedim > & | cell | ) |
Update cell-dependent data (gradients, Jacobians etc.)
cell | The actual cell. |
Definition at line 536 of file fe_values.cc.
Update cell side-dependent FE data (values, gradients).
cell_side | Accessor to cell side. |
Definition at line 551 of file fe_values.cc.
|
inline |
Accessor to scalar values of multicomponent FE.
i | Index of scalar component. |
Definition at line 267 of file fe_values.hh.
|
inline |
Return the gradient of the function_no-th
shape function at the point_no-th
quadrature point.
function_no | Number of the shape function. |
point_no | Number of the quadrature point. |
Definition at line 164 of file fe_values.hh.
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.
function_no | Number of the shape function. |
point_no | Number of the quadrature point. |
Definition at line 276 of file fe_values.cc.
|
inline |
Return the value of the function_no-th
shape function at the point_no-th
quadrature point.
function_no | Number of the shape function. |
point_no | Number of the quadrature point. |
Definition at line 149 of file fe_values.hh.
|
inline |
Return the value of the function_no-th
shape function at the point_no-th
quadrature point.
For vectorial finite elements.
function_no | Number of the shape function. |
point_no | Number of the quadrature point. |
Definition at line 180 of file fe_values.hh.
|
inline |
Accessor to tensor values of multicomponent FE.
i | Index of first tensor component. |
Definition at line 287 of file fe_values.hh.
|
inline |
Accessor to vector values of multicomponent FE.
i | Index of first vector component. |
Definition at line 277 of file fe_values.hh.
|
friend |
Definition at line 428 of file fe_values.hh.
|
friend |
Definition at line 427 of file fe_values.hh.
|
friend |
Definition at line 426 of file fe_values.hh.
|
friend |
Definition at line 431 of file fe_values.hh.
|
friend |
Definition at line 430 of file fe_values.hh.
|
friend |
Definition at line 429 of file fe_values.hh.
|
protected |
Dimension of reference space.
Definition at line 378 of file fe_values.hh.
|
protected |
Auxiliary object for calculation of element-dependent data.
Definition at line 409 of file fe_values.hh.
|
protected |
Precomputed finite element data.
Definition at line 421 of file fe_values.hh.
|
protected |
Dof indices of FESystem sub-elements.
Definition at line 390 of file fe_values.hh.
|
protected |
Numbers of components of FESystem sub-elements in reference space.
Definition at line 393 of file fe_values.hh.
|
protected |
Numbers of components of FESystem sub-elements in real space.
Definition at line 396 of file fe_values.hh.
Type of finite element (scalar, vector, tensor).
Definition at line 387 of file fe_values.hh.
|
protected |
Vector of FEValues for sub-elements of FESystem.
Definition at line 412 of file fe_values.hh.
|
protected |
Number of components of the FE.
Definition at line 415 of file fe_values.hh.
|
protected |
Number of finite element dofs.
Definition at line 384 of file fe_values.hh.
|
protected |
Number of integration points.
Definition at line 381 of file fe_values.hh.
|
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 403 of file fe_values.hh.
|
protected |
Shape functions evaluated at the quadrature points.
Definition at line 399 of file fe_values.hh.
|
protected |
Precomputed FE data (shape functions on reference element) for all side quadrature points.
Definition at line 424 of file fe_values.hh.
|
protected |
Flags that indicate which finite element quantities are to be computed.
Definition at line 406 of file fe_values.hh.
|
protected |
Auxiliary storage of FEValuesViews accessors.
Definition at line 418 of file fe_values.hh.