From 9f293f306789861f4c6e01ac91b3cc3c708dec69 Mon Sep 17 00:00:00 2001 From: bangerth Date: Mon, 7 Aug 2006 14:06:44 +0000 Subject: [PATCH] Fix the first part of the problem in dof_tools_19, where we run aground because we call QGauss<0>(6). git-svn-id: https://svn.dealii.org/trunk@13615 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/include/numerics/vectors.h | 20 +++++++++++++++++++ .../include/numerics/vectors.templates.h | 20 +++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/deal.II/deal.II/include/numerics/vectors.h b/deal.II/deal.II/include/numerics/vectors.h index 3bdfccb08a..b50bf9c89b 100644 --- a/deal.II/deal.II/include/numerics/vectors.h +++ b/deal.II/deal.II/include/numerics/vectors.h @@ -544,6 +544,26 @@ class VectorTools const Quadrature &q_boundary = QGauss(2), const bool project_to_boundary_first = false); + /** + * Declaration of specialization + * of the previous function for + * 1d. At present, it is not + * implemented. + * + * The default value of the boundary + * quadrature formula is an invalid + * object since it makes no sense in 1d. + */ + template + static void project (const DoFHandler<1> &dof, + const ConstraintMatrix &constraints, + const Quadrature<1> &quadrature, + const Function<1> &function, + VECTOR &vec, + const bool enforce_zero_boundary = false, + const Quadrature<0> &q_boundary = *invalid_face_quadrature, + const bool project_to_boundary_first = false); + /** * Create a right hand side * vector. Prior content of the diff --git a/deal.II/deal.II/include/numerics/vectors.templates.h b/deal.II/deal.II/include/numerics/vectors.templates.h index 97f5d4ef8b..98760a90c9 100644 --- a/deal.II/deal.II/include/numerics/vectors.templates.h +++ b/deal.II/deal.II/include/numerics/vectors.templates.h @@ -41,6 +41,9 @@ #include #include + +//TODO[RH]: Use StaticQ1Mapping where appropriate + template inline double sqr_point (const Tensor<1,dim> &p) { @@ -298,6 +301,23 @@ void VectorTools::project (const Mapping<1> &, } +template +void VectorTools::project (const DoFHandler<1> &dof_handler, + const ConstraintMatrix &constraints, + const Quadrature<1> &quadrature, + const Function<1> &function, + VECTOR &vec_result, + const bool enforce_zero_boundary, + const Quadrature<0> &q_boundary, + const bool project_to_boundary_first) +{ + Assert (DEAL_II_COMPAT_MAPPING, ExcCompatibility("mapping")); + static const MappingQ1<1> mapping; + project (mapping, dof_handler, constraints, quadrature, function, vec_result, + enforce_zero_boundary, q_boundary, project_to_boundary_first); +} + + #endif -- 2.39.5