]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Rename <revert> to <reflect>. Make a static member function. Document.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 17 Oct 2003 19:53:13 +0000 (19:53 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 17 Oct 2003 19:53:13 +0000 (19:53 +0000)
git-svn-id: https://svn.dealii.org/trunk@8103 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/quadrature.h
deal.II/base/source/quadrature.cc

index 08b842cd796dbe34586fb1a9190e0f2afc61990b..1a1d59946b7b0767d7ad21deae2315b718154fe7 100644 (file)
@@ -398,6 +398,22 @@ class QProjector
     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);
 };
 
 
index 74317798af89a638bb5b88a651a8b72e7b420585..182c84d4ac5dbf43b9d2ddd6c258dda99223e6b3 100644 (file)
@@ -238,7 +238,9 @@ Quadrature<dim>::memory_consumption () const
 
 
 
-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);
@@ -657,7 +659,7 @@ QProjector<3>::project_to_all_faces (const SubQuadrature &quadrature)
 {
   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;
@@ -688,13 +690,13 @@ QProjector<3>::project_to_all_faces (const SubQuadrature &quadrature)
                                    // 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,
@@ -767,7 +769,7 @@ QProjector<3>::project_to_all_subfaces (const SubQuadrature &quadrature)
 {
   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,
@@ -802,14 +804,14 @@ QProjector<3>::project_to_all_subfaces (const SubQuadrature &quadrature)
   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,

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.