45 template<
unsigned int dim,
unsigned int spacedim>
class FEValuesData;
57 template<>
inline double determinant(
const arma::mat::fixed<1,2> &M)
59 return sqrt(M(0,0)*M(0,0)+M(0,1)*M(0,1));
62 template<>
inline double determinant(
const arma::mat::fixed<2,1> &M)
64 return sqrt(M(0,0)*M(0,0)+M(1,0)*M(1,0));
67 template<>
inline double determinant(
const arma::mat::fixed<0,3> &M)
72 template<>
inline double determinant(
const arma::mat::fixed<3,0> &M)
77 template<>
inline double determinant(
const arma::mat::fixed<1,3> &M)
79 return sqrt(M(0,0)*M(0,0)+M(0,1)*M(0,1)+M(0,2)*M(0,2));
82 template<>
inline double determinant(
const arma::mat::fixed<3,1> &M)
84 return sqrt(M(0,0)*M(0,0)+M(1,0)*M(1,0)+M(2,0)*M(2,0));
87 template<>
inline double determinant(
const arma::mat::fixed<2,3> &M)
89 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))
90 -(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)));
93 template<>
inline double determinant(
const arma::mat::fixed<3,2> &M)
95 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))
96 -(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)));
99 template<
unsigned int n>
inline double determinant(
const arma::mat::fixed<n,n> &M)
128 template<
unsigned int dim,
unsigned int spacedim>
200 template<
unsigned int dim,
unsigned int spacedim>
inline
212 arma::vec::fixed<dim+1> el_bar_coords;
213 arma::vec::fixed<dim> side_bar_coords;
215 for (
unsigned int k=0; k<q.
size(); k++)
219 el_bar_coords.zeros();
222 for (
int j=0; j<dim-1; j++)
224 side_bar_coords(j) = (subq.
point(k))[j];
225 lambda += (subq.
point(k))[j];
227 side_bar_coords(dim-1) = 1.-lambda;
230 for (
unsigned int i=0; i<dim; i++)
232 q.
set_point(k, el_bar_coords.subvec(0,dim-1));