From ae23af850043eb20f077a62d0fb365677912d6cc Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Mon, 8 Nov 2010 19:36:18 +0000 Subject: [PATCH] Convert yet one more file. git-svn-id: https://svn.dealii.org/trunk@22638 0785d39b-7218-0410-832d-ea1e28bc413d --- .../{grid_in.cc => grid_in.all_dimensions.cc} | 35 ++----------------- deal.II/source/grid/grid_in.inst.in | 22 ++++++++++++ 2 files changed, 25 insertions(+), 32 deletions(-) rename deal.II/source/grid/{grid_in.cc => grid_in.all_dimensions.cc} (99%) create mode 100644 deal.II/source/grid/grid_in.inst.in diff --git a/deal.II/source/grid/grid_in.cc b/deal.II/source/grid/grid_in.all_dimensions.cc similarity index 99% rename from deal.II/source/grid/grid_in.cc rename to deal.II/source/grid/grid_in.all_dimensions.cc index b8c0a2084e..1848fcd695 100644 --- a/deal.II/source/grid/grid_in.cc +++ b/deal.II/source/grid/grid_in.all_dimensions.cc @@ -392,9 +392,6 @@ void GridIn::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::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 void GridIn::parse_tecplot_header(std::string &header, @@ -1581,7 +1561,6 @@ void GridIn::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 void GridIn::read_tecplot(std::istream &) @@ -1884,7 +1863,6 @@ void GridIn::debug_output_grid (const std::vector > } -#if deal_II_dimension == 2 template <> void @@ -1954,10 +1932,7 @@ GridIn<2>::debug_output_grid (const std::vector > &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 > &cells, }; } -#endif + template void GridIn::read (const std::string& filename, @@ -2193,10 +2168,6 @@ std::string GridIn::get_format_names () //explicit instantiations -template class GridIn; - -#if deal_II_dimension != 3 -template class GridIn; -#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 index 0000000000..613147debb --- /dev/null +++ b/deal.II/source/grid/grid_in.inst.in @@ -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; + +#if deal_II_dimension != 3 + template class GridIn; +#endif + } + -- 2.39.5