]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Convert yet one more file.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 8 Nov 2010 19:36:18 +0000 (19:36 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 8 Nov 2010 19:36:18 +0000 (19:36 +0000)
git-svn-id: https://svn.dealii.org/trunk@22638 0785d39b-7218-0410-832d-ea1e28bc413d

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

similarity index 99%
rename from deal.II/source/grid/grid_in.cc
rename to deal.II/source/grid/grid_in.all_dimensions.cc
index b8c0a2084e9739c39bb2e6679a4dce078546c8e7..1848fcd6953dde89516d751029b8c218552a8643 100644 (file)
@@ -392,9 +392,6 @@ void GridIn<dim, spacedim>::read_xda (std::istream &)
 
 
 
-// 2D XDA meshes
-#if deal_II_dimension == 2
-
 template <>
 void GridIn<2>::read_xda (std::istream &in)
 {
@@ -464,12 +461,7 @@ void GridIn<2>::read_xda (std::istream &in)
   tria->create_triangulation_compatibility (vertices, cells, subcelldata);
 }
 
-#endif // #if deal_II_dimension == 2
-
-
 
-// 3-D XDA meshes
-#if deal_II_dimension == 3
 
 template <>
 void GridIn<3>::read_xda (std::istream &in)
@@ -547,7 +539,6 @@ void GridIn<3>::read_xda (std::istream &in)
   tria->create_triangulation_compatibility (vertices, cells, subcelldata);
 }
 
-#endif // #if deal_II_dimension == 3
 
 
 
@@ -874,8 +865,6 @@ void GridIn<dim, spacedim>::read_msh (std::istream &in)
 }
 
 
-#if deal_II_dimension == 1
-
 template <>
 void GridIn<1>::read_netcdf (const std::string &)
 {
@@ -888,11 +877,6 @@ void GridIn<1,2>::read_netcdf (const std::string &)
   AssertThrow(false, ExcImpossibleInDim(1));
 }
 
-#endif
-
-
-
-#if deal_II_dimension == 2
 
 template <>
 void GridIn<2, 3>::read_netcdf (const std::string &) {
@@ -1170,9 +1154,6 @@ void GridIn<2>::read_netcdf (const std::string &filename)
 #endif
 }
 
-#endif
-
-#if deal_II_dimension == 3
 
 template <>
 void GridIn<3>::read_netcdf (const std::string &filename)
@@ -1380,7 +1361,6 @@ void GridIn<3>::read_netcdf (const std::string &filename)
 #endif
 }
 
-#endif
 
 template <int dim, int spacedim>
 void GridIn<dim, spacedim>::parse_tecplot_header(std::string &header,
@@ -1581,7 +1561,6 @@ void GridIn<dim, spacedim>::parse_tecplot_header(std::string &header,
 
 
 
-#if deal_II_dimension == 2
 
 template <>
 void GridIn<2>::read_tecplot (std::istream &in)
@@ -1813,7 +1792,7 @@ void GridIn<2>::read_tecplot (std::istream &in)
   tria->create_triangulation_compatibility (vertices, cells, subcelldata);
 }
 
-#endif
+
 
 template <int dim, int spacedim>
 void GridIn<dim, spacedim>::read_tecplot(std::istream &)
@@ -1884,7 +1863,6 @@ void GridIn<dim, spacedim>::debug_output_grid (const std::vector<CellData<dim> >
 }
 
 
-#if deal_II_dimension == 2
 
 template <>
 void
@@ -1954,10 +1932,7 @@ GridIn<2>::debug_output_grid (const std::vector<CellData<2> > &cells,
       << "pause -1" << std::endl;
 }
 
-#endif
-
 
-#if deal_II_dimension == 3
 
 template <>
 void
@@ -2030,7 +2005,7 @@ GridIn<3>::debug_output_grid (const std::vector<CellData<3> > &cells,
     };
 }
 
-#endif
+
 
 template <int dim, int spacedim>
 void GridIn<dim, spacedim>::read (const std::string& filename,
@@ -2193,10 +2168,6 @@ std::string GridIn<dim, spacedim>::get_format_names ()
 
 
 //explicit instantiations
-template class GridIn<deal_II_dimension>;
-
-#if deal_II_dimension != 3
-template class GridIn<deal_II_dimension, deal_II_dimension+1>;
-#endif
+#include "grid_in.inst"
 
 DEAL_II_NAMESPACE_CLOSE
diff --git a/deal.II/source/grid/grid_in.inst.in b/deal.II/source/grid/grid_in.inst.in
new file mode 100644 (file)
index 0000000..613147d
--- /dev/null
@@ -0,0 +1,22 @@
+//---------------------------------------------------------------------------
+//    $Id$
+//    Version: $Name$
+//
+//    Copyright (C) 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)
+  {
+    template class GridIn<deal_II_dimension>;
+
+#if deal_II_dimension != 3
+    template class GridIn<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.