]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
More changes to compile only once.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 8 Nov 2010 20:10:32 +0000 (20:10 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 8 Nov 2010 20:10:32 +0000 (20:10 +0000)
git-svn-id: https://svn.dealii.org/trunk@22639 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/dofs/dof_handler.all_dimensions.cc [moved from deal.II/source/dofs/dof_handler.cc with 99% similarity]
deal.II/source/dofs/dof_handler.inst.in [new file with mode: 0644]

similarity index 99%
rename from deal.II/source/dofs/dof_handler.cc
rename to deal.II/source/dofs/dof_handler.all_dimensions.cc
index 729bee2f4c895e7d9b5ccc445ef3b350b374ed0f..615f877e15d16de00006c8ed44e9fce693a64f68 100644 (file)
@@ -57,8 +57,6 @@ namespace internal
   {
     return &dealii::DoFHandler<dim,spacedim>::invalid_dof_index;
   }
-
-  template const unsigned int * dummy<deal_II_dimension,deal_II_dimension> ();
 }
 
 
@@ -1466,8 +1464,6 @@ DoFHandler<dim, spacedim>::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<unsigned char> &bo
   return boundary_indicators.size()*get_fe().dofs_per_vertex;
 }
 
-#endif
 
 
 template<int dim, int spacedim>
@@ -1816,11 +1811,7 @@ void DoFHandler<dim,spacedim>::clear_space ()
 
 
 /*-------------- Explicit Instantiations -------------------------------*/
-template class DoFHandler<deal_II_dimension>;
-
-#if deal_II_dimension==1 || deal_II_dimension==2
-template class DoFHandler<deal_II_dimension,deal_II_dimension+1>;
-#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 (file)
index 0000000..4553a73
--- /dev/null
@@ -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<deal_II_dimension,deal_II_dimension> ();
+#if deal_II_dimension < 3
+      template const unsigned int * dummy<deal_II_dimension,deal_II_dimension+1> ();
+#endif
+    \}
+
+
+    template class DoFHandler<deal_II_dimension>;
+
+#if deal_II_dimension < 3
+    template class DoFHandler<deal_II_dimension,deal_II_dimension+1>;
+#endif
+  }
+

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.