Flow123d
JS_before_hm-2039-g19af1f327
|
Go to the documentation of this file.
19 #ifndef FINITE_ELEMENT_HH_
20 #define FINITE_ELEMENT_HH_
34 template<
unsigned int dim>
class FESystem;
35 template<
unsigned int spacedim>
class FEValues;
36 template<
unsigned int dim>
class FE_P_disc;
73 Dof(
unsigned int dim_,
74 unsigned int n_face_idx_,
88 double evaluate(
const FS &function_space,
89 unsigned int basis_idx)
const;
138 virtual double basis_value(
unsigned int basis_index,
140 unsigned int comp_index = 0
151 unsigned int comp_index = 0
155 virtual unsigned int dim()
const = 0;
249 template<
unsigned int dim>
263 {
return dofs_.size(); }
275 const arma::vec::fixed<dim> &p,
276 const unsigned int comp = 0)
const;
287 arma::vec::fixed<dim>
shape_grad(
const unsigned int i,
288 const arma::vec::fixed<dim> &p,
289 const unsigned int comp = 0)
const;
296 inline const Dof &
dof(
unsigned int i)
const
316 void init(
bool primitive =
true,
unsigned int n_face_idx
Index of n-face to which the dof is associated.
unsigned int n_components() const
Getter for number of components.
FiniteElement()
Constructor.
bool is_primitive() const
Indicates whether the basis functions have one or more nonzero components (scalar FE spaces are alway...
void init(bool primitive=true, FEType type=FEScalar)
Clears all internal structures.
arma::vec::fixed< dim > shape_grad(const unsigned int i, const arma::vec::fixed< dim > &p, const unsigned int comp=0) const
Calculates the comp-th component of the gradient of the i-th shape function at the point p on the ref...
double evaluate(const FS &function_space, unsigned int basis_idx) const
Evaulate dof for basis function of given function space.
std::vector< std::vector< bool > > nonzero_components_
Footprints of nonzero components of shape functions.
arma::vec coefs
Coefficients of linear combination of function value components.
virtual std::vector< arma::vec::fixed< dim+1 > > dof_points() const
arma::mat node_matrix
Matrix that determines the coefficients of the raw basis functions from the values at the support poi...
std::vector< Dof > dofs_
Set of degrees of freedom (functionals) defining the FE.
const Dof & dof(unsigned int i) const
Returns i -th degree of freedom.
std::vector< unsigned int > component_indices_
Indices of nonzero components of shape functions (for primitive FE).
virtual ~FiniteElement()
Destructor.
virtual const arma::vec basis_grad(unsigned int basis_index, const arma::vec &point, unsigned int comp_index=0) const =0
Gradient of the i th basis function at point point.
unsigned int system_to_component_index(unsigned sys_idx) const
Returns the component index for vector valued finite elements.
unsigned int dim
Association to n-face of given dimension (point, line, triangle, tetrahedron.
Calculates finite element data on the actual cell.
unsigned int n_components() const
Returns numer of components of the basis function.
virtual UpdateFlags update_each(UpdateFlags flags)
Decides which additional quantities have to be computed for each cell.
bool is_primitive_
Primitive FE is using componentwise shape functions, i.e. only one component is nonzero for each shap...
ArmaMat< double, N, M > mat
virtual void compute_node_matrix()
Initializes the node_matrix for computing the coefficients of the shape functions in the raw basis of...
FEType type_
Type of FiniteElement.
Abstract class for the description of a general finite element on a reference simplex in dim dimensio...
unsigned int n_dofs() const
Returns the number of degrees of freedom needed by the finite element.
FunctionSpace(unsigned int space_dim, unsigned int n_components)
Enum type UpdateFlags indicates which quantities are to be recomputed on each finite element cell.
Dof(unsigned int dim_, unsigned int n_face_idx_, arma::vec coords_, arma::vec coefs_, DofType type_)
arma::vec coords
Barycentric coordinates.
virtual unsigned int dim() const =0
Dimension of function space (number of basis functions).
std::shared_ptr< FunctionSpace > function_space_
Function space defining the FE.
UpdateFlags
Enum type UpdateFlags indicates which quantities are to be recomputed on each finite element cell.
unsigned int space_dim_
Space dimension of function arguments (i.e. 1, 2 or 3).
unsigned int space_dim() const
Getter for space dimension.
void setup_components()
Initialize vectors with information about components of basis functions.
virtual double basis_value(unsigned int basis_index, const arma::vec &point, unsigned int comp_index=0) const =0
Value of the i th basis function at point point.
unsigned int n_components_
Number of components of function values.
Compound finite element on dim dimensional simplex.
Discontinuous Lagrangean finite element on dim dimensional simplex.
const std::vector< bool > & get_nonzero_components(unsigned int sys_idx) const
Returns the mask of nonzero components for given basis function.
unsigned int n_space_components(unsigned int spacedim)
Number of components of FE in a mapped space with dimension spacedim.
double shape_value(const unsigned int i, const arma::vec::fixed< dim > &p, const unsigned int comp=0) const
Calculates the value of the comp-th component of the i-th shape function at the point p on the refere...