Flow123d
release_2.2.0-914-gf1a3a4f
|
Compound finite element on dim
dimensional simplex.
More...
#include <fe_system.hh>
Classes | |
struct | DofComponentData |
Public Member Functions | |
FESystem (std::shared_ptr< FiniteElement< dim, spacedim > > fe, FEType t) | |
Constructor. FESystem for vector or tensor created from a scalar FE. More... | |
FESystem (const std::shared_ptr< FiniteElement< dim, spacedim > > &fe, unsigned int n) | |
Constructor. FESystem with n components created from a scalar FE. More... | |
FESystem (std::vector< std::shared_ptr< FiniteElement< dim, spacedim > > > fe) | |
Constructor. FESystem for mixed elements. More... | |
std::vector< unsigned int > | get_scalar_components () const |
std::vector< unsigned int > | get_vector_components () const |
double | basis_value (const unsigned int i, const arma::vec::fixed< dim > &p, const unsigned int comp) const override |
The vector variant of basis_value must be implemented but need not be used. More... | |
arma::vec::fixed< dim > | basis_grad (const unsigned int i, const arma::vec::fixed< dim > &p, const unsigned int comp) const override |
The vector variant of basis_grad must be implemented but need not be used. More... | |
unsigned int | n_components () const override |
Returns numer of components of the basis function. More... | |
UpdateFlags | update_each (UpdateFlags flags) override |
Decides which additional quantities have to be computed for each cell. More... | |
Public Member Functions inherited from FiniteElement< dim, spacedim > | |
FiniteElement () | |
Constructor. More... | |
const unsigned int | n_dofs () const |
Returns the number of degrees of freedom needed by the finite element. More... | |
Dof | dof (unsigned int i) const |
Returns i -th degree of freedom. More... | |
virtual | ~FiniteElement () |
Destructor. More... | |
Private Member Functions | |
void | initialize () |
Initialization of the internal structures from the vector of base FE. More... | |
FEInternalData * | initialize (const Quadrature< dim > &q) override |
Calculates the data on the reference cell. More... | |
void | fill_fe_values (const Quadrature< dim > &q, FEInternalData &data, FEValuesData< dim, spacedim > &fv_data) override |
Computes the shape function values and gradients on the actual cell and fills the FEValues structure. More... | |
void | compute_node_matrix () override |
Initializes the node_matrix for computing the coefficients of the shape functions in the raw basis of functions_space_ . This is done by evaluating the dofs_ for the basis function and by inverting the resulting matrix. More... | |
Private Attributes | |
std::vector< std::shared_ptr< FiniteElement< dim, spacedim > > > | fe_ |
Pointers to base FE objects. More... | |
std::vector< DofComponentData > | fe_dof_indices_ |
Information about dofs. More... | |
std::vector< unsigned int > | scalar_components_ |
std::vector< unsigned int > | vector_components_ |
unsigned int | n_components_ |
Additional Inherited Members | |
Protected Member Functions inherited from FiniteElement< dim, spacedim > | |
void | init (bool primitive=true, FEType type=FEScalar) |
Clears all internal structures. More... | |
void | setup_components () |
Initialize vectors with information about components of basis functions. More... | |
const bool | is_primitive () const |
Indicates whether the basis functions have one or more nonzero components (scalar FE spaces are always primitive). More... | |
unsigned int | system_to_component_index (unsigned sys_idx) const |
Returns the component index for vector valued finite elements. More... | |
const std::vector< bool > & | get_nonzero_components (unsigned int sys_idx) const |
Returns the mask of nonzero components for given basis function. More... | |
Protected Attributes inherited from FiniteElement< dim, spacedim > | |
FEType | type_ |
Type of FiniteElement. More... | |
bool | is_primitive_ |
Primitive FE is using componentwise shape functions, i.e. only one component is nonzero for each shape function. More... | |
std::vector< unsigned int > | component_indices_ |
Indices of nonzero components of shape functions (for primitive FE). More... | |
std::vector< std::vector< bool > > | nonzero_components_ |
Footprints of nonzero components of shape functions. More... | |
arma::mat | node_matrix |
Matrix that determines the coefficients of the raw basis functions from the values at the support points. More... | |
FunctionSpace * | function_space_ |
Function space defining the FE. More... | |
std::vector< Dof > | dofs_ |
Set of degrees of freedom (functionals) defining the FE. More... | |
Compound finite element on dim
dimensional simplex.
This type of FE is used for vector-valued functions and for systems of equations.
Definition at line 36 of file fe_system.hh.
FESystem< dim, spacedim >::FESystem | ( | std::shared_ptr< FiniteElement< dim, spacedim > > | fe, |
FEType | t | ||
) |
Constructor. FESystem for vector or tensor created from a scalar FE.
fe | Base finite element class. |
t | Type (vector or tensor). |
Definition at line 28 of file fe_system.cc.
FESystem< dim, spacedim >::FESystem | ( | const std::shared_ptr< FiniteElement< dim, spacedim > > & | fe, |
unsigned int | n | ||
) |
Constructor. FESystem with n
components created from a scalar FE.
fe | Base finite element class. |
n | Multiplicity (number of components). |
Definition at line 47 of file fe_system.cc.
FESystem< dim, spacedim >::FESystem | ( | std::vector< std::shared_ptr< FiniteElement< dim, spacedim > > > | fe | ) |
Constructor. FESystem for mixed elements.
fe | Base finite element classes. |
Definition at line 56 of file fe_system.cc.
|
overridevirtual |
The vector variant of basis_grad must be implemented but need not be used.
Reimplemented from FiniteElement< dim, spacedim >.
Definition at line 161 of file fe_system.cc.
|
overridevirtual |
The vector variant of basis_value must be implemented but need not be used.
Reimplemented from FiniteElement< dim, spacedim >.
Definition at line 146 of file fe_system.cc.
|
overrideprivatevirtual |
Initializes the node_matrix
for computing the coefficients of the shape functions in the raw basis of functions_space_
. This is done by evaluating the dofs_
for the basis function and by inverting the resulting matrix.
Reimplemented from FiniteElement< dim, spacedim >.
Definition at line 189 of file fe_system.cc.
|
inlineoverrideprivatevirtual |
Computes the shape function values and gradients on the actual cell and fills the FEValues structure.
q | Quadrature rule. |
data | Precomputed finite element data. |
fv_data | Data to be computed. |
Reimplemented from FiniteElement< dim, spacedim >.
Definition at line 253 of file fe_system.cc.
|
inline |
|
inline |
|
private |
Initialization of the internal structures from the vector of base FE.
Definition at line 67 of file fe_system.cc.
|
overrideprivatevirtual |
Calculates the data on the reference cell.
q | Quadrature rule. |
flags | Update flags. |
Reimplemented from FiniteElement< dim, spacedim >.
Definition at line 208 of file fe_system.cc.
|
inlineoverridevirtual |
Returns numer of components of the basis function.
Reimplemented from FiniteElement< dim, spacedim >.
Definition at line 80 of file fe_system.hh.
|
inlineoverridevirtual |
Decides which additional quantities have to be computed for each cell.
flags | Computed update flags. |
Reimplemented from FiniteElement< dim, spacedim >.
Definition at line 177 of file fe_system.cc.
|
private |
Pointers to base FE objects.
Definition at line 123 of file fe_system.hh.
|
private |
Information about dofs.
Definition at line 126 of file fe_system.hh.
|
private |
Definition at line 131 of file fe_system.hh.
|
private |
Definition at line 128 of file fe_system.hh.
|
private |
Definition at line 129 of file fe_system.hh.