32 template <
unsigned int dim,
unsigned int spacedim>
58 double basis_value(
const unsigned int i,
const arma::vec::fixed<dim> &p)
const;
63 arma::vec::fixed<dim>
basis_grad(
const unsigned int i,
const arma::vec::fixed<dim> &p)
const;
70 arma::vec::fixed<dim>
basis_vector(
const unsigned int i,
const arma::vec::fixed<dim> &p)
const;
77 arma::mat::fixed<dim,dim>
basis_grad_vector(
const unsigned int i,
const arma::vec::fixed<dim> &p)
const;
131 template<
unsigned int dim,
unsigned int spacedim>
134 arma::vec::fixed<dim> sp;
141 for (
unsigned int sid=0; sid<RefElement<dim>::n_sides; ++sid)
144 for (
unsigned int i=0; i<RefElement<dim>::n_nodes_per_side; ++i)
157 template<
unsigned int dim,
unsigned int spacedim>
160 OLD_ASSERT(
false,
"basis_value() may not be called for vectorial finite element.");
165 template<
unsigned int dim,
unsigned int spacedim>
168 OLD_ASSERT(
false,
"basis_grad() may not be called for vectorial finite element.");
169 return arma::vec::fixed<dim>();
172 template<
unsigned int dim,
unsigned int spacedim>
177 arma::vec::fixed<dim> v(p);
185 template<
unsigned int dim,
unsigned int spacedim>
190 return arma::eye(dim,dim);
193 template<
unsigned int dim,
unsigned int spacedim>
196 arma::mat::fixed<n_raw_functions,dim+1> F;
197 arma::vec::fixed<dim> r;
220 for (
unsigned int j=0; j<dim+1; ++j)
231 template<
unsigned int dim,
unsigned int spacedim>
238 arma::mat::fixed<n_raw_functions,dim> raw_values;
239 arma::mat::fixed<dim+1,dim> shape_values;
240 vector<arma::vec> values;
243 values.resize(dim+1);
244 for (
unsigned int i=0; i<q.
size(); i++)
251 for (
unsigned int j=0; j<dim+1; j++)
252 values[j] = trans(shape_values.row(j));
260 arma::mat::fixed<dim,dim> grad;
261 arma::mat::fixed<dim,dim> shape_grads;
262 vector<arma::mat> grads;
266 for (
unsigned int i=0; i<q.
size(); i++)
268 for (
unsigned int k=0; k<dim+1; k++)
283 template<
unsigned int dim,
unsigned int spacedim>
inline 297 template<
unsigned int dim,
unsigned int spacedim>
inline 306 vector<arma::vec::fixed<spacedim> > vectors;
307 vectors.resize(dim+1);
308 for (
unsigned int i = 0; i < q.
size(); i++)
310 for (
unsigned int k=0; k<dim+1; k++)
320 vector<arma::mat::fixed<spacedim,spacedim> > grads;
322 for (
unsigned int i = 0; i < q.
size(); i++)
324 for (
unsigned int k=0; k<dim+1; k++)
UpdateFlags
Enum type UpdateFlags indicates which quantities are to be recomputed on each finite element cell...
void init()
Clears all internal structures.
Determinant of the Jacobian.
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.
double basis_value(const unsigned int i, const arma::vec::fixed< dim > &p) const
The scalar variant of basis_vector must be implemented but may not be used.
arma::mat::fixed< dim, dim > basis_grad_vector(const unsigned int i, const arma::vec::fixed< dim > &p) const
Returns the gradient of the ith basis function at the point p.
std::vector< std::vector< arma::mat::fixed< spacedim, spacedim > > > shape_grad_vectors
Gradients of shape functions (for vectorial finite elements).
FEInternalData * initialize(const Quadrature< dim > &q, UpdateFlags flags)
Calculates the data on the reference cell.
std::vector< std::vector< arma::vec > > basis_vectors
Precomputed values 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...
bool is_scalar_fe
Indicator of scalar versus vectorial finite element.
unsigned int number_of_dofs
Total number of degrees of freedom at one finite element.
Base class for quadrature rules on simplices in arbitrary dimensions.
std::vector< arma::vec::fixed< dim > > generalized_support_points
Support points for non-Lagrangean finite elements.
std::vector< arma::mat::fixed< spacedim, dim > > jacobians
Jacobians of the mapping at the quadrature points.
unsigned int number_of_single_dofs[dim+1]
Number of single dofs at one geometrical entity of the given dimension (point, line, triangle, tetrahedron).
Raviart-Thomas element of order 0.
arma::vec::fixed< dim > basis_grad(const unsigned int i, const arma::vec::fixed< dim > &p) const
The scalar variant of basis_grad_vector must be implemented but may not be used.
virtual ~FE_RT0()
Destructor.
UpdateFlags update_each(UpdateFlags flags)
Decides which additional quantities have to be computed for each cell.
void compute_node_matrix()
Computes the conversion matrix from internal basis to shape functions.
Shape function gradients.
std::vector< std::vector< arma::mat > > basis_grad_vectors
Precomputed gradients of basis functions at the quadrature points.
static double side_measure(unsigned int sid)
arma::vec::fixed< dim > basis_vector(const unsigned int i, const arma::vec::fixed< dim > &p) const
Returns the ith basis function evaluated at the point p.
std::vector< std::vector< arma::vec::fixed< spacedim > > > shape_vectors
Shape functions (for vectorial finite elements) evaluated at quadrature points.
unsigned int order
Polynomial order - to be possibly used in hp methods.
Class FEValuesData holds the arrays of data computed by Mapping and FiniteElement.
const unsigned int size() const
Returns number of quadrature points.
std::vector< double > determinants
Determinants of Jacobians at quadrature points.
const arma::vec::fixed< dim > & point(const unsigned int i) const
Returns the ith quadrature point.
Structure for storing the precomputed finite element data.
Abstract class for description of finite elements.
Abstract class for the description of a general finite element on a reference simplex in dim dimensio...
arma::mat node_matrix
Matrix that determines the coefficients of the raw basis functions from the values at the support poi...
static const unsigned int n_raw_functions
Number of raw basis functions.