Quadrature<dim>
project_to_child (const Quadrature<dim> &quadrature,
const unsigned int child_no);
+
+ private:
+ /**
+ * Given a quadrature object in
+ * 2d, reflect all quadrature
+ * points at the main diagonal
+ * and return them with their
+ * original weights.
+ *
+ * This function is necessary for
+ * projecting a 2d quadrature
+ * rule onto the faces of a 3d
+ * cube, since there we need both
+ * orientations.
+ */
+ static Quadrature<2> reflect (const Quadrature<2> &q);
};
-Quadrature<2> revert (const Quadrature<2> &q)
+template <int dim>
+Quadrature<2>
+QProjector<dim>::reflect (const Quadrature<2> &q)
{
std::vector<Point<2> > q_points (q.n_quadrature_points);
std::vector<double> weights (q.n_quadrature_points);
{
const unsigned int dim = 3;
- const SubQuadrature q_reverted = revert (quadrature);
+ const SubQuadrature q_reflected = reflect (quadrature);
const unsigned int n_points = quadrature.n_quadrature_points,
n_faces = GeometryInfo<dim>::faces_per_cell;
// orientation of faces
for (unsigned int face=0; face<n_faces; ++face)
{
- project_to_face(q_reverted, face, help);
+ project_to_face(q_reflected, face, help);
std::copy (help.begin(), help.end(),
std::back_inserter (q_points));
}
for (unsigned int face=0; face<n_faces; ++face)
- std::copy (q_reverted.get_weights().begin(),
- q_reverted.get_weights().end(),
+ std::copy (q_reflected.get_weights().begin(),
+ q_reflected.get_weights().end(),
std::back_inserter (weights));
Assert (q_points.size() == n_points * n_faces * 2,
{
const unsigned int dim = 3;
- const SubQuadrature q_reverted = revert (quadrature);
+ const SubQuadrature q_reflected = reflect (quadrature);
const unsigned int n_points = quadrature.n_quadrature_points,
n_faces = GeometryInfo<dim>::faces_per_cell,
for (unsigned int face=0; face<n_faces; ++face)
for (unsigned int subface=0; subface<subfaces_per_face; ++subface)
{
- project_to_subface(q_reverted, face, subface, help);
+ project_to_subface(q_reflected, face, subface, help);
std::copy (help.begin(), help.end(),
std::back_inserter (q_points));
};
for (unsigned int face=0; face<n_faces; ++face)
for (unsigned int subface=0; subface<subfaces_per_face; ++subface)
- std::copy (q_reverted.get_weights().begin(),
- q_reverted.get_weights().end(),
+ std::copy (q_reflected.get_weights().begin(),
+ q_reflected.get_weights().end(),
std::back_inserter (weights));
Assert (q_points.size() == n_points * n_faces * subfaces_per_face * 2,