From: Wolfgang Bangerth Date: Wed, 12 Dec 2007 17:29:53 +0000 (+0000) Subject: Avoid the gratuitous use of the preprocessor. Use an explicit specialization instead. X-Git-Tag: v8.0.0~9553 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd6e643fb916e91ac1d28b6f6f11cb65e7019d92;p=dealii.git Avoid the gratuitous use of the preprocessor. Use an explicit specialization instead. git-svn-id: https://svn.dealii.org/trunk@15594 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/fe/fe_raviart_thomas.h b/deal.II/deal.II/include/fe/fe_raviart_thomas.h index 336ada9d29..437569dd18 100644 --- a/deal.II/deal.II/include/fe/fe_raviart_thomas.h +++ b/deal.II/deal.II/include/fe/fe_raviart_thomas.h @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2003, 2004, 2005, 2006 by the deal.II authors +// Copyright (C) 2003, 2004, 2005, 2006, 2007 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -459,6 +459,9 @@ class FE_RaviartThomasNodal template <> std::vector FE_RaviartThomas<1>::get_dpo_vector (const unsigned int); +template <> +void +FE_RaviartThomas<1>::initialize_restriction(); #endif // DOXYGEN diff --git a/deal.II/deal.II/source/fe/fe_raviart_thomas.cc b/deal.II/deal.II/source/fe/fe_raviart_thomas.cc index f4e1273981..f1a157a08e 100644 --- a/deal.II/deal.II/source/fe/fe_raviart_thomas.cc +++ b/deal.II/deal.II/source/fe/fe_raviart_thomas.cc @@ -257,15 +257,15 @@ FE_RaviartThomas::initialize_support_points (const unsigned int deg) #if deal_II_dimension == 1 -template +template <> void -FE_RaviartThomas::initialize_restriction() +FE_RaviartThomas<1>::initialize_restriction() { - for (unsigned int i=0;i::children_per_cell;++i) + for (unsigned int i=0;i::children_per_cell;++i) this->restriction[i].reinit(0,0); } -#else +#endif // This function is the same Raviart-Thomas interpolation performed by // interpolate. Still, we cannot use interpolate, since it was written @@ -396,7 +396,6 @@ FE_RaviartThomas::initialize_restriction() delete polynomials[d]; } -#endif #if deal_II_dimension == 1