From: guido Date: Tue, 12 Jul 2005 22:03:21 +0000 (+0000) Subject: add version projecting on one face, but returning a quadrature rule X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2af509b14c95b94ee463027cdf32210efcd10ff0;p=dealii-svn.git add version projecting on one face, but returning a quadrature rule git-svn-id: https://svn.dealii.org/trunk@11129 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/base/include/base/qprojector.h b/deal.II/base/include/base/qprojector.h index 5c4dc76917..65c269dcc2 100644 --- a/deal.II/base/include/base/qprojector.h +++ b/deal.II/base/include/base/qprojector.h @@ -90,20 +90,52 @@ class QProjector const unsigned int face_no, std::vector > &q_points); + /** + * Compute the cell quadrature + * formula corresponding to using + * quadrature on face + * face_no. For further + * details, see the general doc + * for this class. + */ + static Quadrature + 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 face_no, subface - * number subface_no. For - * further details, see the - * general doc for this class. + * number subface_no. + * + * @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 > &q_points); + /** + * Compute the cell quadrature + * formula corresponding to using + * quadrature on subface + * subface_no of face + * face_no. + * + * @note Only the points are + * transformed. The quadrature + * weights are the same as those + * of the original rule. + */ + static Quadrature + 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 diff --git a/deal.II/base/source/quadrature.cc b/deal.II/base/source/quadrature.cc index a9e12b248c..e1d9f01ee7 100644 --- a/deal.II/base/source/quadrature.cc +++ b/deal.II/base/source/quadrature.cc @@ -1094,6 +1094,29 @@ DataSetDescriptor () +template +Quadrature +QProjector::project_to_face(const SubQuadrature &quadrature, + const unsigned int face_no) +{ + std::vector > points(quadrature.n_quadrature_points); + project_to_face(quadrature, face_no, points); + return Quadrature(points, quadrature.get_weights()); +} + + +template +Quadrature +QProjector::project_to_subface(const SubQuadrature &quadrature, + const unsigned int face_no, + const unsigned int subface_no) +{ + std::vector > points(quadrature.n_quadrature_points); + project_to_subface(quadrature, face_no, subface_no, points); + return Quadrature(points, quadrature.get_weights()); +} + + // ------------------------------------------------------------ //