34 template<
unsigned int dim,
unsigned int spacedim>
class FEValuesData;
46 template<>
inline double determinant(
const arma::mat::fixed<1,2> &M)
48 return sqrt(M(0,0)*M(0,0)+M(0,1)*M(0,1));
51 template<>
inline double determinant(
const arma::mat::fixed<2,1> &M)
53 return sqrt(M(0,0)*M(0,0)+M(1,0)*M(1,0));
56 template<>
inline double determinant(
const arma::mat::fixed<0,3> &M)
61 template<>
inline double determinant(
const arma::mat::fixed<3,0> &M)
66 template<>
inline double determinant(
const arma::mat::fixed<1,3> &M)
68 return sqrt(M(0,0)*M(0,0)+M(0,1)*M(0,1)+M(0,2)*M(0,2));
71 template<>
inline double determinant(
const arma::mat::fixed<3,1> &M)
73 return sqrt(M(0,0)*M(0,0)+M(1,0)*M(1,0)+M(2,0)*M(2,0));
76 template<>
inline double determinant(
const arma::mat::fixed<2,3> &M)
78 return sqrt((M(0,0)*M(0,0)+M(0,1)*M(0,1)+M(0,2)*M(0,2))*(M(1,0)*M(1,0)+M(1,1)*M(1,1)+M(1,2)*M(1,2))
79 -(M(0,0)*M(1,0)+M(0,1)*M(1,1)+M(0,2)*M(1,2))*(M(0,0)*M(1,0)+M(0,1)*M(1,1)+M(0,2)*M(1,2)));
82 template<>
inline double determinant(
const arma::mat::fixed<3,2> &M)
84 return sqrt((M(0,0)*M(0,0)+M(1,0)*M(1,0)+M(2,0)*M(2,0))*(M(0,1)*M(0,1)+M(1,1)*M(1,1)+M(2,1)*M(2,1))
85 -(M(0,0)*M(0,1)+M(1,0)*M(1,1)+M(2,0)*M(2,1))*(M(0,0)*M(0,1)+M(1,0)*M(1,1)+M(2,0)*M(2,1)));
88 template<
unsigned int n>
inline double determinant(
const arma::mat::fixed<n,n> &M)
117 template<
unsigned int dim,
unsigned int spacedim>
178 void transform_subquadrature(
unsigned int sid,
189 template<
unsigned int dim,
unsigned int spacedim>
inline 200 arma::vec::fixed<dim+1> el_bar_coords;
201 arma::vec::fixed<dim> side_bar_coords;
203 for (
unsigned int k=0; k<q.
size(); k++)
207 el_bar_coords.zeros();
210 for (
int j=0; j<dim-1; j++)
212 side_bar_coords(j) = (subq.
point(k))[j];
213 lambda += (subq.
point(k))[j];
215 side_bar_coords(dim-1) = 1.-lambda;
218 for (
unsigned int i=0; i<dim; i++)
220 q.
set_point(k, el_bar_coords.subvec(0,dim-1));
void set_weight(const unsigned int i, const double w)
Sets individual quadrature weight.
UpdateFlags
Enum type UpdateFlags indicates which quantities are to be recomputed on each finite element cell...
virtual ~Mapping()
Destructor.
Declaration of class which handles the ordering of degrees of freedom (dof) and mappings between loca...
Enum type UpdateFlags indicates which quantities are to be recomputed on each finite element cell...
Base class for quadrature rules on simplices in arbitrary dimensions.
double determinant(const T &M)
Calculates determinant of a rectangular matrix.
double weight(const unsigned int i) const
Returns the ith weight.
Abstract class for the mapping between reference and actual cell.
void resize(const unsigned int n_q_points)
Modify the number of quadrature points.
void transform_subquadrature(unsigned int sid, unsigned int pid, const Quadrature< dim-1 > &subq, Quadrature< dim > &q)
Creates a cell dim-dimensional quadrature from side (dim-1)-dimensional quadrature.
std::vector< arma::vec > bar_coords
Auxiliary array of barycentric coordinates of quadrature points.
Class FEValuesData holds the arrays of data computed by Mapping and FiniteElement.
void set_point(const unsigned int i, const arma::vec::fixed< dim > &p)
Sets individual quadrature point coordinates.
const unsigned int size() const
Returns number of quadrature points.
const arma::vec::fixed< dim > & point(const unsigned int i) const
Returns the ith quadrature point.
Class RefElement defines numbering of vertices, sides, calculation of normal vectors etc...
Mapping data that can be precomputed on the actual cell.