+template <>
+void QProjector<3>::project_to_face (const Quadrature<2> &quadrature,
+ const unsigned int face_no,
+ vector<Point<3> > &q_points) {
+ const unsigned int dim=3;
+ Assert (face_no<2*dim, ExcInvalidIndex (face_no, 2*dim));
+
+ for (unsigned int p=0; p<quadrature.n_quadrature_points; ++p)
+ switch (face_no)
+ {
+ case 0:
+ q_points[p] = Point<dim>(quadrature.quad_point(p)(0),
+ 0,
+ quadrature.quad_point(p)(1));
+ break;
+ case 1:
+ q_points[p] = Point<dim>(quadrature.quad_point(p)(0),
+ 1,
+ quadrature.quad_point(p)(1));
+ break;
+ case 2:
+ q_points[p] = Point<dim>(quadrature.quad_point(p)(0),
+ quadrature.quad_point(p)(1),
+ 0);
+ break;
+ case 3:
+ q_points[p] = Point<dim>(1,
+ quadrature.quad_point(p)(0),
+ quadrature.quad_point(p)(1));
+ break;
+ case 4:
+ q_points[p] = Point<dim>(quadrature.quad_point(p)(0),
+ quadrature.quad_point(p)(1),
+ 1);
+ break;
+ case 5:
+ q_points[p] = Point<dim>(0,
+ quadrature.quad_point(p)(0),
+ quadrature.quad_point(p)(1));
+ break;
+
+ default:
+ Assert (false, ExcInternalError());
+ };
+};
+
+
+
template <>
void QProjector<2>::project_to_subface (const Quadrature<1> &quadrature,
const unsigned int face_no,
+template <>
+void QProjector<3>::project_to_subface (const Quadrature<2> &quadrature,
+ const unsigned int face_no,
+ const unsigned int subface_no,
+ vector<Point<3> > &q_points) {
+ const unsigned int dim=3;
+ Assert (face_no<2*dim, ExcInvalidIndex (face_no, 2*dim));
+ Assert (subface_no<(1<<(dim-1)), ExcInvalidIndex (face_no, 1<<(dim-1)));
+
+
+ // for all faces and subfaces: first project
+ // onto the first subface of each face, then
+ // move it to the right place
+ for (unsigned int p=0; p<quadrature.n_quadrature_points; ++p)
+ switch (face_no)
+ {
+ case 0:
+ q_points[p] = Point<dim>(quadrature.quad_point(p)(0)/2,
+ 0,
+ quadrature.quad_point(p)(1)/2);
+ switch (subface_no)
+ {
+ case 0:
+ break;
+ case 1:
+ q_points[p][0] += 1./2.;
+ break;
+ case 2:
+ q_points[p][0] += 1./2.;
+ q_points[p][2] += 1./2.;
+ break;
+ case 3:
+ q_points[p][2] += 1./2.;
+ break;
+ default:
+ Assert (false, ExcInternalError());
+ };
+
+ break;
+ case 1:
+ q_points[p] = Point<dim>(quadrature.quad_point(p)(0)/2,
+ 1,
+ quadrature.quad_point(p)(1)/2);
+ switch (subface_no)
+ {
+ case 0:
+ break;
+ case 1:
+ q_points[p][0] += 1./2.;
+ break;
+ case 2:
+ q_points[p][0] += 1./2.;
+ q_points[p][2] += 1./2.;
+ break;
+ case 3:
+ q_points[p][2] += 1./2.;
+ break;
+ default:
+ Assert (false, ExcInternalError());
+ };
+ break;
+ case 2:
+ q_points[p] = Point<dim>(quadrature.quad_point(p)(0)/2,
+ quadrature.quad_point(p)(1)/2,
+ 0);
+ switch (subface_no)
+ {
+ case 0:
+ break;
+ case 1:
+ q_points[p][0] += 1./2.;
+ break;
+ case 2:
+ q_points[p][0] += 1./2.;
+ q_points[p][1] += 1./2.;
+ break;
+ case 3:
+ q_points[p][1] += 1./2.;
+ break;
+ default:
+ Assert (false, ExcInternalError());
+ };
+ break;
+ case 3:
+ q_points[p] = Point<dim>(1,
+ quadrature.quad_point(p)(0)/2,
+ quadrature.quad_point(p)(1)/2);
+ switch (subface_no)
+ {
+ case 0:
+ break;
+ case 1:
+ q_points[p][1] += 1./2.;
+ break;
+ case 2:
+ q_points[p][1] += 1./2.;
+ q_points[p][2] += 1./2.;
+ break;
+ case 3:
+ q_points[p][2] += 1./2.;
+ break;
+ default:
+ Assert (false, ExcInternalError());
+ };
+ break;
+ case 4:
+ q_points[p] = Point<dim>(quadrature.quad_point(p)(0)/2,
+ quadrature.quad_point(p)(1)/2,
+ 1);
+ switch (subface_no)
+ {
+ case 0:
+ break;
+ case 1:
+ q_points[p][0] += 1./2.;
+ break;
+ case 2:
+ q_points[p][0] += 1./2.;
+ q_points[p][1] += 1./2.;
+ break;
+ case 3:
+ q_points[p][1] += 1./2.;
+ break;
+ default:
+ Assert (false, ExcInternalError());
+ };
+ break;
+ case 5:
+ q_points[p] = Point<dim>(0,
+ quadrature.quad_point(p)(0)/2,
+ quadrature.quad_point(p)(1)/2);
+ switch (subface_no)
+ {
+ case 0:
+ break;
+ case 1:
+ q_points[p][1] += 1./2.;
+ break;
+ case 2:
+ q_points[p][1] += 1./2.;
+ q_points[p][2] += 1./2.;
+ break;
+ case 3:
+ q_points[p][2] += 1./2.;
+ break;
+ default:
+ Assert (false, ExcInternalError());
+ };
+ break;
+ default:
+ Assert (false, ExcInternalError());
+ };
+};
+
+
+
// explicit instantiations; note: we need them all for all dimensions
template class Quadrature<1>;
template class Quadrature<2>;
+template class Quadrature<3>;
// two space dimensions, so we leave in these Assert'ions until
// that is done
template <int dim>
-QGauss2<dim>::QGauss2 () :
- Quadrature<dim> (QGauss2<dim-1>(), QGauss2<1>()){
- Assert (dim<3, ExcInternalError());
-};
+QGauss2<dim>::QGauss2 () : Quadrature<dim> (QGauss2<dim-1>(), QGauss2<1>()) {};
template <int dim>
QGauss3<dim>::QGauss3 () :
template <int dim>
QIteratedTrapez<dim>::QIteratedTrapez (const unsigned n) :
- Quadrature<dim> (QIteratedTrapez<dim-1>(n), QIteratedTrapez<1>(n))
-{
- Assert (dim<3, ExcInternalError());
-};
+ Quadrature<dim> (QIteratedTrapez<dim-1>(n), QIteratedTrapez<1>(n)) {};
template class QTrapez<2>;
template class QIteratedTrapez<2>;
+template class QGauss2<3>;
+template class QGauss3<3>;
+template class QGauss4<3>;
+template class QGauss5<3>;
+template class QGauss6<3>;
+template class QGauss7<3>;
+template class QGauss8<3>;
+template class QMidpoint<3>;
+template class QSimpson<3>;
+template class QTrapez<3>;
+template class QIteratedTrapez<3>;
+