32 template<
unsigned int dim,
unsigned int spacedim>
38 template<
unsigned int dim,
unsigned int spacedim>
43 for (
unsigned int i = 0; i <= dim; i++)
45 number_of_single_dofs[i] = 0;
46 number_of_pairs[i] = 0;
47 number_of_triples[i] = 0;
48 number_of_sextuples[i] = 0;
52 template<
unsigned int dim,
unsigned int spacedim>
inline 55 return number_of_dofs;
58 template<
unsigned int dim,
unsigned int spacedim>
inline 62 OLD_ASSERT(object_dim >= 0 && object_dim <= dim,
63 "Object type number is out of range.");
67 return number_of_single_dofs[object_dim];
69 return number_of_pairs[object_dim];
71 return number_of_triples[object_dim];
73 return number_of_sextuples[object_dim];
79 template<
unsigned int dim,
unsigned int spacedim>
inline 84 arma::mat M(number_of_dofs, number_of_dofs);
86 for (
unsigned int i = 0; i < number_of_dofs; i++)
87 for (
unsigned int j = 0; j < number_of_dofs; j++) {
88 M(j, i) = basis_value(j, get_generalized_support_points()[i]);
91 node_matrix = arma::inv(M);
94 template<
unsigned int dim,
unsigned int spacedim>
101 arma::vec values(number_of_dofs);
103 for (
unsigned int i=0; i<q.
size(); i++)
105 for (
unsigned int j=0; j<number_of_dofs; j++)
106 values[j] = basis_value(j, q.
point(i));
113 arma::mat grads(number_of_dofs, dim);
115 for (
unsigned int i=0; i<q.
size(); i++)
117 for (
unsigned int j=0; j<number_of_dofs; j++)
118 grads.row(j) = arma::trans(basis_grad(j, q.
point(i)));
126 template<
unsigned int dim,
unsigned int spacedim>
inline 137 template<
unsigned int dim,
unsigned int spacedim>
inline 146 for (
unsigned int i = 0; i < q.
size(); i++)
153 for (
unsigned int i = 0; i < q.
size(); i++)
160 template<
unsigned int dim,
unsigned int spacedim>
163 if (generalized_support_points.size() > 0)
165 return generalized_support_points;
169 return unit_support_points;
174 template<
unsigned int dim,
unsigned int spacedim>
std::vector< arma::vec > shape_values
Shape functions evaluated at the quadrature points.
UpdateFlags
Enum type UpdateFlags indicates which quantities are to be recomputed on each finite element cell...
Declaration of class which handles the ordering of degrees of freedom (dof) and mappings between loca...
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...
void init()
Clears all internal structures.
std::vector< arma::mat::fixed< dim, spacedim > > inverse_jacobians
Inverse Jacobians at the quadrature points.
UpdateFlags update_flags
Flags that indicate which finite element quantities are to be computed.
Class FEValues calculates finite element data on the actual cells such as shape function values...
std::vector< arma::mat > basis_grads
Precomputed gradients of basis functions at the quadrature points.
Base class for quadrature rules on simplices in arbitrary dimensions.
virtual UpdateFlags update_each(UpdateFlags flags)
Decides which additional quantities have to be computed for each cell.
virtual ~FiniteElement()
Destructor.
virtual void compute_node_matrix()
Initializes the node_matrix for computing the coefficients of the raw basis functions from values at ...
std::vector< arma::mat > shape_gradients
Gradients of shape functions evaluated at the quadrature points.
Basic definitions of numerical quadrature rules.
Shape function gradients.
Class FEValuesData holds the arrays of data computed by Mapping and FiniteElement.
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 size() const
Returns number of quadrature points.
std::vector< arma::vec > basis_values
Precomputed values of basis functions at the quadrature points.
DofMultiplicity
Multiplicity of finite element dofs.
const arma::vec::fixed< dim > & point(const unsigned int i) const
Returns the ith quadrature point.
FiniteElement()
Constructor.
#define OLD_ASSERT_EQUAL(a, b)
const unsigned int n_dofs() const
Returns the number of degrees of freedom needed by the finite element.
virtual FEInternalData * initialize(const Quadrature< dim > &q, UpdateFlags flags)
Calculates the data on the reference cell.
Structure for storing the precomputed finite element data.
Abstract class for description of finite elements.
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...
Abstract class for the description of a general finite element on a reference simplex in dim dimensio...