]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
add version projecting on one face, but returning a quadrature rule
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 12 Jul 2005 22:03:21 +0000 (22:03 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 12 Jul 2005 22:03:21 +0000 (22:03 +0000)
git-svn-id: https://svn.dealii.org/trunk@11129 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 5c4dc76917781388ac8b252989e2c0612d308be8..65c269dcc20a7a61412ca7e767333f7604767c56 100644 (file)
@@ -90,20 +90,52 @@ class QProjector
                                 const unsigned int      face_no,
                                 std::vector<Point<dim> > &q_points);
 
+                                    /**
+                                     * Compute the cell quadrature
+                                     * formula corresponding to using
+                                     * <tt>quadrature</tt> on face
+                                     * <tt>face_no</tt>. For further
+                                     * details, see the general doc
+                                     * for this class.
+                                     */
+    static Quadrature<dim>
+    project_to_face (const SubQuadrature &quadrature,
+                    const unsigned int      face_no);
+
                                     /**
                                      * Compute the quadrature points
                                      * on the cell if the given
                                      * quadrature formula is used on
                                      * face <tt>face_no</tt>, subface
-                                     * number <tt>subface_no</tt>. For
-                                     * further details, see the
-                                     * general doc for this class.
+                                     * number <tt>subface_no</tt>.
+                                     *
+                                     * @note Only the points are
+                                     * transformed. The quadrature
+                                     * weights are the same as those
+                                     * of the original rule.
                                      */
     static void project_to_subface (const SubQuadrature &quadrature,
                                    const unsigned int   face_no,
                                    const unsigned int   subface_no,
                                    std::vector<Point<dim> > &q_points);
 
+                                    /**
+                                     * Compute the cell quadrature
+                                     * formula corresponding to using
+                                     * <tt>quadrature</tt> on subface
+                                     * <tt>subface_no</tt> of face
+                                     * <tt>face_no</tt>.
+                                     *
+                                     * @note Only the points are
+                                     * transformed. The quadrature
+                                     * weights are the same as those
+                                     * of the original rule.
+                                     */
+    static Quadrature<dim>
+    project_to_subface (const SubQuadrature &quadrature,
+                       const unsigned int      face_no,
+                       const unsigned int   subface_no);
+
                                     /**
                                      * Take a face quadrature formula
                                      * and generate a cell quadrature
index a9e12b248c4009c68629c8152b2799d4f6e0750a..e1d9f01ee7fa27bde4d0da6901db2bda593ea229 100644 (file)
@@ -1094,6 +1094,29 @@ DataSetDescriptor ()
 
 
 
+template <int dim>
+Quadrature<dim>
+QProjector<dim>::project_to_face(const SubQuadrature &quadrature,
+                                const unsigned int face_no)
+{
+  std::vector<Point<dim> > points(quadrature.n_quadrature_points);
+  project_to_face(quadrature, face_no, points);
+  return Quadrature<dim>(points, quadrature.get_weights());
+}
+
+
+template <int dim>
+Quadrature<dim>
+QProjector<dim>::project_to_subface(const SubQuadrature &quadrature,
+                                   const unsigned int face_no,
+                                   const unsigned int subface_no)
+{
+  std::vector<Point<dim> > points(quadrature.n_quadrature_points);
+  project_to_subface(quadrature, face_no, subface_no, points);
+  return Quadrature<dim>(points, quadrature.get_weights());
+}
+
+
 // ------------------------------------------------------------ //
 
 

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.