30 #ifndef FINITE_ELEMENT_HH_
31 #define FINITE_ELEMENT_HH_
36 #include <boost/assign/list_of.hpp>
41 template<
unsigned int dim,
unsigned int spacedim>
class FEValuesData;
150 template<
unsigned int dim,
unsigned int spacedim>
168 const unsigned int n_dofs()
const;
189 const arma::vec::fixed<dim> &p)
const = 0;
200 virtual arma::vec::fixed<dim>
basis_vector(
const unsigned int i,
201 const arma::vec::fixed<dim> &p)
const = 0;
213 virtual arma::vec::fixed<dim>
basis_grad(
const unsigned int i,
214 const arma::vec::fixed<dim> &p)
const = 0;
227 const arma::vec::fixed<dim> &p)
const = 0;
UpdateFlags
Enum type UpdateFlags indicates which quantities are to be recomputed on each finite element cell...
virtual FEInternalData * initialize(const Quadrature< dim > &q, UpdateFlags flags)
Calculates the data on the reference cell.
bool is_scalar_fe
Indicator of scalar versus vectorial finite element.
const std::vector< arma::vec::fixed< dim > > & get_generalized_support_points()
Returns either the generalized support points (if they are defined) or the unit support points...
virtual void compute_node_matrix()
Initializes the node_matrix for computing the coefficients of the raw basis functions from values at ...
const unsigned int n_object_dofs(unsigned int object_dim, DofMultiplicity multiplicity)
Returns the number of single dofs/dof pairs/triples/sextuples that lie on a single geometric entity o...
const unsigned int n_dofs() const
Returns the number of degrees of freedom needed by the finite element.
Base class for quadrature rules on simplices in arbitrary dimensions.
std::vector< arma::mat > basis_grads
Precomputed gradients of basis functions at the quadrature points.
const bool is_scalar() const
Indicates whether the finite element function space is scalar or vectorial.
std::vector< std::vector< arma::vec > > basis_vectors
Precomputed values of basis functions at the quadrature points.
std::vector< arma::vec::fixed< dim > > unit_support_points
Support points for Lagrangean finite elements.
const std::vector< DofMultiplicity > dof_multiplicities
Enum type UpdateFlags indicates which quantities are to be recomputed on each finite element cell...
virtual UpdateFlags update_each(UpdateFlags flags)
Decides which additional quantities have to be computed for each cell.
Abstract class for the description of a general finite element on a reference simplex in dim dimensio...
virtual const unsigned int polynomial_order() const
Returns the maximum degree of space of polynomials contained in the finite element space...
virtual double basis_value(const unsigned int i, const arma::vec::fixed< dim > &p) const =0
Calculates the value of the i-th raw basis function at the point p on the reference element...
virtual arma::vec::fixed< dim > basis_vector(const unsigned int i, const arma::vec::fixed< dim > &p) const =0
Variant of basis_value() for vectorial finite elements.
std::vector< arma::vec::fixed< dim > > generalized_support_points
Support points for non-Lagrangean finite elements.
arma::mat node_matrix
Matrix that determines the coefficients of the raw basis functions from the values at the support poi...
unsigned int number_of_sextuples[dim+1]
Number of sextuples of dofs associated to one triangle.
unsigned int number_of_pairs[dim+1]
Number of pairs of dofs at one geometrical entity of the given dimension (applicable to lines and tri...
std::vector< std::vector< arma::mat > > basis_grad_vectors
Precomputed gradients of basis functions at the quadrature points.
virtual void fill_fe_values(const Quadrature< dim > &q, FEInternalData &data, FEValuesData< dim, spacedim > &fv_data)
Computes the shape function values and gradients on the actual cell and fills the FEValues structure...
Class FEValuesData holds the arrays of data computed by Mapping and FiniteElement.
virtual arma::mat::fixed< dim, dim > basis_grad_vector(const unsigned int i, const arma::vec::fixed< dim > &p) const =0
Variant of basis_grad() for vectorial finite elements.
unsigned int number_of_single_dofs[dim+1]
Number of single dofs at one geometrical entity of the given dimension (point, line, triangle, tetrahedron).
std::vector< arma::vec > basis_values
Precomputed values of basis functions at the quadrature points.
DofMultiplicity
Multiplicity of finite element dofs.
unsigned int order
Polynomial order - to be possibly used in hp methods.
FiniteElement()
Constructor.
Structure for storing the precomputed finite element data.
void init()
Clears all internal structures.
virtual arma::vec::fixed< dim > basis_grad(const unsigned int i, const arma::vec::fixed< dim > &p) const =0
Calculates the gradient of the i-th raw basis function at the point p on the reference element...
unsigned int number_of_triples[dim+1]
Number of triples of dofs associated to one triangle.
virtual ~FiniteElement()
Destructor.
unsigned int number_of_dofs
Total number of degrees of freedom at one finite element.