34 unsigned int comp_index)
const 36 OLD_ASSERT(basis_index < this->
dim(),
"Index of basis function is out of range.");
39 if (basis_index>0 && comp_index==basis_index-1)
40 return point[comp_index]-1;
42 return point[comp_index];
48 unsigned int comp_index)
const 50 OLD_ASSERT(basis_index < this->
dim(),
"Index of basis function is out of range.");
67 template<
unsigned int dim>
70 arma::vec::fixed<dim> sp;
73 this->function_space_ = make_shared<RT0_space>(
dim);
75 for (
unsigned int sid=0; sid<RefElement<dim>::n_sides; ++sid)
78 for (
unsigned int i=0; i<RefElement<dim>::n_nodes_per_side; ++i)
82 arma::vec::fixed<dim+1> bsp;
83 bsp.subvec(1,
dim) = sp;
84 bsp[0] = 1. - arma::sum(sp);
88 this->component_indices_.clear();
91 this->compute_node_matrix();
108 template<
unsigned int dim>
111 arma::vec::fixed<dim> sp;
114 this->function_space_ = make_shared<RT0_space>(
dim);
116 for (
unsigned int sid=0; sid<RefElement<dim>::n_sides; ++sid)
119 for (
unsigned int i=0; i<RefElement<dim>::n_nodes_per_side; ++i)
123 arma::vec::fixed<dim+1> bsp;
124 bsp.subvec(1,
dim) = sp;
125 bsp[0] = 1. - arma::sum(sp);
129 this->component_indices_.clear();
132 this->compute_node_matrix();
FE_RT0_disc()
Constructor.
RT0_space(unsigned int dim)
unsigned int n_components_
Number of components of function values.
Class FEValues calculates finite element data on the actual cells such as shape function values...
double basis_value(unsigned int basis_index, const arma::vec &point, unsigned int comp_index) const override
Value of the i th basis function at point point.
const arma::vec basis_grad(unsigned int basis_index, const arma::vec &point, unsigned int comp_index) const override
Gradient of the i th basis function at point point.
Raviart-Thomas element of order 0.
unsigned int n_components() const
Getter for number of components.
Discontinuous Raviart-Thomas element of order 0.
unsigned int dim() const override
Dimension of function space (number of basis functions).
Definitions of particular quadrature rules on simplices.
Class RefElement defines numbering of vertices, sides, calculation of normal vectors etc...
unsigned int space_dim_
Space dimension of function arguments (i.e. 1, 2 or 3).
Definitions of Raviart-Thomas finite elements.