DEAL_II_NAMESPACE_OPEN
-template <int dim>
-Quadrature<2>
-QProjector<dim>::reflect(const Quadrature<2> &q)
+namespace internal
{
- // Take the points and reflect them by the diagonal
- std::vector<Point<2>> q_points(q.get_points());
- for (Point<2> &p : q_points)
- std::swap(p[0], p[1]);
+ namespace QProjector
+ {
+ Quadrature<2>
+ reflect(const Quadrature<2> &q)
+ {
+ // Take the points and reflect them by the diagonal
+ std::vector<Point<2>> q_points(q.get_points());
+ for (Point<2> &p : q_points)
+ std::swap(p[0], p[1]);
- return Quadrature<2>(q_points, q.get_weights());
-}
+ return Quadrature<2>(q_points, q.get_weights());
+ }
-template <int dim>
-Quadrature<2>
-QProjector<dim>::rotate(const Quadrature<2> &q, const unsigned int n_times)
-{
- std::vector<Point<2>> q_points(q.size());
- for (unsigned int i = 0; i < q.size(); ++i)
+ Quadrature<2>
+ rotate(const Quadrature<2> &q, const unsigned int n_times)
{
- switch (n_times % 4)
+ std::vector<Point<2>> q_points(q.size());
+ for (unsigned int i = 0; i < q.size(); ++i)
{
- case 0:
- // 0 degree. the point remains as it is.
- q_points[i] = q.point(i);
- break;
-
- case 1:
- // 90 degree counterclockwise
- q_points[i][0] = 1.0 - q.point(i)[1];
- q_points[i][1] = q.point(i)[0];
- break;
- case 2:
- // 180 degree counterclockwise
- q_points[i][0] = 1.0 - q.point(i)[0];
- q_points[i][1] = 1.0 - q.point(i)[1];
- break;
- case 3:
- // 270 degree counterclockwise
- q_points[i][0] = q.point(i)[1];
- q_points[i][1] = 1.0 - q.point(i)[0];
- break;
+ switch (n_times % 4)
+ {
+ case 0:
+ // 0 degree. the point remains as it is.
+ q_points[i] = q.point(i);
+ break;
+
+ case 1:
+ // 90 degree counterclockwise
+ q_points[i][0] = 1.0 - q.point(i)[1];
+ q_points[i][1] = q.point(i)[0];
+ break;
+ case 2:
+ // 180 degree counterclockwise
+ q_points[i][0] = 1.0 - q.point(i)[0];
+ q_points[i][1] = 1.0 - q.point(i)[1];
+ break;
+ case 3:
+ // 270 degree counterclockwise
+ q_points[i][0] = q.point(i)[1];
+ q_points[i][1] = 1.0 - q.point(i)[0];
+ break;
+ }
}
+
+ return Quadrature<2>(q_points, q.get_weights());
}
+ } // namespace QProjector
+} // namespace internal
- return Quadrature<2>(q_points, q.get_weights());
-}
template <>
mutation = quadrature_f;
break;
case 1:
- mutation = rotate(quadrature_f, 1);
+ mutation = internal::QProjector::rotate(quadrature_f, 1);
break;
case 2:
- mutation = rotate(quadrature_f, 2);
+ mutation = internal::QProjector::rotate(quadrature_f, 2);
break;
case 3:
- mutation = rotate(quadrature_f, 3);
+ mutation = internal::QProjector::rotate(quadrature_f, 3);
break;
case 4:
- mutation = reflect(quadrature_f);
+ mutation = internal::QProjector::reflect(quadrature_f);
break;
case 5:
- mutation = rotate(reflect(quadrature_f), 3);
+ mutation = internal::QProjector::rotate(
+ internal::QProjector::reflect(quadrature_f), 3);
break;
case 6:
- mutation = rotate(reflect(quadrature_f), 2);
+ mutation = internal::QProjector::rotate(
+ internal::QProjector::reflect(quadrature_f), 2);
break;
case 7:
- mutation = rotate(reflect(quadrature_f), 1);
+ mutation = internal::QProjector::rotate(
+ internal::QProjector::reflect(quadrature_f), 1);
break;
default:
Assert(false, ExcInternalError())
Assert(reference_cell_type == ReferenceCell::Type::Hex, ExcNotImplemented());
const unsigned int dim = 3;
- SubQuadrature q_reflected = reflect(quadrature);
+ SubQuadrature q_reflected = internal::QProjector::reflect(quadrature);
SubQuadrature q[8] = {quadrature,
- rotate(quadrature, 1),
- rotate(quadrature, 2),
- rotate(quadrature, 3),
+ internal::QProjector::rotate(quadrature, 1),
+ internal::QProjector::rotate(quadrature, 2),
+ internal::QProjector::rotate(quadrature, 3),
q_reflected,
- rotate(q_reflected, 3),
- rotate(q_reflected, 2),
- rotate(q_reflected, 1)};
+ internal::QProjector::rotate(q_reflected, 3),
+ internal::QProjector::rotate(q_reflected, 2),
+ internal::QProjector::rotate(q_reflected, 1)};
const unsigned int n_points = quadrature.size(),
n_faces = GeometryInfo<dim>::faces_per_cell,