From b3536f66e8949de72a81524b8de10848b1744d19 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Mon, 8 Nov 2010 20:10:32 +0000 Subject: [PATCH] More changes to compile only once. git-svn-id: https://svn.dealii.org/trunk@22639 0785d39b-7218-0410-832d-ea1e28bc413d --- ...ndler.cc => dof_handler.all_dimensions.cc} | 11 +------ deal.II/source/dofs/dof_handler.inst.in | 32 +++++++++++++++++++ 2 files changed, 33 insertions(+), 10 deletions(-) rename deal.II/source/dofs/{dof_handler.cc => dof_handler.all_dimensions.cc} (99%) create mode 100644 deal.II/source/dofs/dof_handler.inst.in diff --git a/deal.II/source/dofs/dof_handler.cc b/deal.II/source/dofs/dof_handler.all_dimensions.cc similarity index 99% rename from deal.II/source/dofs/dof_handler.cc rename to deal.II/source/dofs/dof_handler.all_dimensions.cc index 729bee2f4c..615f877e15 100644 --- a/deal.II/source/dofs/dof_handler.cc +++ b/deal.II/source/dofs/dof_handler.all_dimensions.cc @@ -57,8 +57,6 @@ namespace internal { return &dealii::DoFHandler::invalid_dof_index; } - - template const unsigned int * dummy (); } @@ -1466,8 +1464,6 @@ DoFHandler::last_active_hex () const -#if deal_II_dimension == 1 - template <> unsigned int DoFHandler<1>::n_boundary_dofs () const { @@ -1545,7 +1541,6 @@ unsigned int DoFHandler<1,2>::n_boundary_dofs (const std::set &bo return boundary_indicators.size()*get_fe().dofs_per_vertex; } -#endif template @@ -1816,11 +1811,7 @@ void DoFHandler::clear_space () /*-------------- Explicit Instantiations -------------------------------*/ -template class DoFHandler; - -#if deal_II_dimension==1 || deal_II_dimension==2 -template class DoFHandler; -#endif +#include "dof_handler.inst" DEAL_II_NAMESPACE_CLOSE diff --git a/deal.II/source/dofs/dof_handler.inst.in b/deal.II/source/dofs/dof_handler.inst.in new file mode 100644 index 0000000000..4553a733d4 --- /dev/null +++ b/deal.II/source/dofs/dof_handler.inst.in @@ -0,0 +1,32 @@ +//--------------------------------------------------------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//--------------------------------------------------------------------------- + + +for (deal_II_dimension : DIMENSIONS) + { + namespace internal + \{ + template const unsigned int * dummy (); +#if deal_II_dimension < 3 + template const unsigned int * dummy (); +#endif + \} + + + template class DoFHandler; + +#if deal_II_dimension < 3 + template class DoFHandler; +#endif + } + -- 2.39.5