47 template<
unsigned int dim>
76 static const double unit_cell_volume[] = { 1, 1, 0.5, 1./6 };
84 this->quadrature_points.push_back(p);
85 this->weights.push_back(1);
89 nquads =
sizeof(q1d) /
sizeof(pQUAD);
93 nquads =
sizeof(q2d) /
sizeof(pQUAD);
97 nquads =
sizeof(q3d) /
sizeof(pQUAD);
101 ASSERT(order < nquads,
"Quadrature of given order is not implemented.");
103 for (
int i=0; i<q[order]->npoints; i++)
105 for (
unsigned int j=0; j<dim; j++)
106 p(j) = q[order]->points[i*(dim+1)+j];
108 this->quadrature_points.push_back(p);
113 this->weights.push_back(q[order]->weights[i]*unit_cell_volume[dim]);
Symmetric Gauss-Legendre quadrature formulae on simplices.
Global macros to enhance readability and debugging, general constants.
Definitions of particular quadrature rules on simplices.
QGauss(const unsigned int order)
Create a formula of given order.