Flow123d
JS_before_hm-989-g79825ac
|
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) |
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) |
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) |
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... | |
void | fill_scalar_data (const ElementValues< spacedim > &elm_values, const FEInternalData &fe_data) |
Compute shape functions and gradients on the actual cell for scalar FE. More... | |
void | fill_vec_data (const ElementValues< spacedim > &elm_values, const FEInternalData &fe_data) |
Compute shape functions and gradients on the actual cell for vectorial FE. More... | |
void | fill_vec_contravariant_data (const ElementValues< spacedim > &elm_values, const FEInternalData &fe_data) |
Compute shape functions and gradients on the actual cell for vectorial FE. More... | |
void | fill_vec_piola_data (const ElementValues< spacedim > &elm_values, const FEInternalData &fe_data) |
Compute shape functions and gradients on the actual cell for Raviart-Thomas FE. More... | |
void | fill_tensor_data (const ElementValues< spacedim > &elm_values, const FEInternalData &fe_data) |
Compute shape functions and gradients on the actual cell for tensorial FE. More... | |
void | fill_system_data (const ElementValues< spacedim > &elm_values, const FEInternalData &fe_data) |
Compute shape functions and gradients on the actual cell for mixed system of FE. 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< std::vector< shared_ptr< FEInternalData > > > | side_fe_data |
Precomputed FE data (shape functions on reference element) for all sides and permuted quadrature points. More... | |
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 59 of file fe_values.hh.
Default constructor with postponed initialization.
Definition at line 122 of file fe_values.cc.
|
inline |
Constructor with initialization of data structures (see initialize() for description of parameters).
Definition at line 83 of file fe_values.hh.
Correct deallocation of objects created by 'initialize' methods.
Definition at line 130 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 183 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 188 of file fe_values.hh.
|
inline |
Return dimension of reference space.
Definition at line 285 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 515 of file fe_values.cc.
|
protected |
Compute shape functions and gradients on the actual cell for scalar FE.
Definition at line 310 of file fe_values.cc.
|
protected |
Compute shape functions and gradients on the actual cell for mixed system of FE.
Definition at line 458 of file fe_values.cc.
|
protected |
Compute shape functions and gradients on the actual cell for tensorial FE.
Definition at line 426 of file fe_values.cc.
|
protected |
Compute shape functions and gradients on the actual cell for vectorial FE.
Definition at line 361 of file fe_values.cc.
|
protected |
Compute shape functions and gradients on the actual cell for vectorial FE.
Definition at line 329 of file fe_values.cc.
|
protected |
Compute shape functions and gradients on the actual cell for Raviart-Thomas FE.
Definition at line 393 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 232 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 136 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 200 of file fe_values.hh.
|
inline |
Returns the number of shape functions.
Definition at line 279 of file fe_values.hh.
|
inline |
Returns the number of quadrature points.
Definition at line 273 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 234 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 213 of file fe_values.hh.
|
inline |
Return coordinates of all quadrature points in the actual cell system.
Definition at line 223 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 548 of file fe_values.cc.
Update cell side-dependent FE data (values, gradients).
cell_side | Accessor to cell side. |
Definition at line 563 of file fe_values.cc.
|
inline |
Accessor to scalar values of multicomponent FE.
i | Index of scalar component. |
Definition at line 244 of file fe_values.hh.
arma::vec::fixed< spacedim > FEValues< spacedim >::shape_grad | ( | const unsigned int | function_no, |
const unsigned int | point_no | ||
) |
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 277 of file fe_values.cc.
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 298 of file fe_values.cc.
double FEValues< spacedim >::shape_value | ( | const unsigned int | function_no, |
const unsigned int | point_no | ||
) |
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 268 of file fe_values.cc.
double FEValues< spacedim >::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.
For vectorial finite elements.
function_no | Number of the shape function. |
point_no | Number of the quadrature point. |
Definition at line 286 of file fe_values.cc.
|
inline |
Accessor to tensor values of multicomponent FE.
i | Index of first tensor component. |
Definition at line 264 of file fe_values.hh.
|
inline |
Accessor to vector values of multicomponent FE.
i | Index of first vector component. |
Definition at line 254 of file fe_values.hh.
|
protected |
Dimension of reference space.
Definition at line 365 of file fe_values.hh.
|
protected |
Auxiliary object for calculation of element-dependent data.
Definition at line 396 of file fe_values.hh.
|
protected |
Precomputed finite element data.
Definition at line 408 of file fe_values.hh.
|
protected |
Dof indices of FESystem sub-elements.
Definition at line 377 of file fe_values.hh.
|
protected |
Numbers of components of FESystem sub-elements in reference space.
Definition at line 380 of file fe_values.hh.
|
protected |
Numbers of components of FESystem sub-elements in real space.
Definition at line 383 of file fe_values.hh.
Type of finite element (scalar, vector, tensor).
Definition at line 374 of file fe_values.hh.
|
protected |
Vector of FEValues for sub-elements of FESystem.
Definition at line 399 of file fe_values.hh.
|
protected |
Number of components of the FE.
Definition at line 402 of file fe_values.hh.
|
protected |
Number of finite element dofs.
Definition at line 371 of file fe_values.hh.
|
protected |
Number of integration points.
Definition at line 368 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 390 of file fe_values.hh.
|
protected |
Shape functions evaluated at the quadrature points.
Definition at line 386 of file fe_values.hh.
|
protected |
Precomputed FE data (shape functions on reference element) for all sides and permuted quadrature points.
Definition at line 411 of file fe_values.hh.
|
protected |
Flags that indicate which finite element quantities are to be computed.
Definition at line 393 of file fe_values.hh.
|
protected |
Auxiliary storage of FEValuesViews accessors.
Definition at line 405 of file fe_values.hh.