From d94efb33651ea3b68b6632604f64e70edca56586 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 7 May 2015 11:47:33 -0500 Subject: [PATCH] Remove a few #ifdefs by just moving a variable into the Assertion. --- .../deal.II/numerics/vector_tools.templates.h | 20 ++++--------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/include/deal.II/numerics/vector_tools.templates.h b/include/deal.II/numerics/vector_tools.templates.h index a2715b986f..b71d1ac809 100644 --- a/include/deal.II/numerics/vector_tools.templates.h +++ b/include/deal.II/numerics/vector_tools.templates.h @@ -6724,11 +6724,8 @@ namespace VectorTools const InVector &fe_function, const Point &point) { -#ifdef DEBUG - const FiniteElement &fe = dof.get_fe(); - Assert(fe.n_components() == 1, + Assert(dof.get_fe().n_components() == 1, ExcMessage ("Finite element is not scalar as is necessary for this function")); -#endif Vector value(1); point_value(mapping, dof, fe_function, point, value); @@ -6744,11 +6741,8 @@ namespace VectorTools const InVector &fe_function, const Point &point) { -#ifdef DEBUG - const hp::FECollection &fe = dof.get_fe(); - Assert(fe.n_components() == 1, + Assert(dof.get_fe().n_components() == 1, ExcMessage ("Finite element is not scalar as is necessary for this function")); -#endif Vector value(1); point_value(mapping, dof, fe_function, point, value); @@ -6901,11 +6895,8 @@ namespace VectorTools const InVector &fe_function, const Point &point) { -#ifdef DEBUG - const FiniteElement &fe = dof.get_fe(); - Assert(fe.n_components() == 1, + Assert(dof.get_fe().n_components() == 1, ExcMessage ("Finite element is not scalar as is necessary for this function")); -#endif std::vector > gradient(1); point_gradient (mapping, dof, fe_function, point, gradient); @@ -6921,11 +6912,8 @@ namespace VectorTools const InVector &fe_function, const Point &point) { -#ifdef DEBUG - const hp::FECollection &fe = dof.get_fe(); - Assert(fe.n_components() == 1, + Assert(dof.get_fe().n_components() == 1, ExcMessage ("Finite element is not scalar as is necessary for this function")); -#endif std::vector > gradient(1); point_gradient (mapping, dof, fe_function, point, gradient); -- 2.39.5