From: bangerth Date: Tue, 24 Sep 2013 02:41:13 +0000 (+0000) Subject: Do not instantiate stuff for dim=4. This has been an old wart, and one we need not... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b7af46e31331686b978e3bf1d255b1f0a8381d6d;p=dealii-svn.git Do not instantiate stuff for dim=4. This has been an old wart, and one we need not propagate. No viz program can actually visualize such data. Nor do we have the actual writers for this. git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@30904 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/source/base/CMakeLists.txt b/deal.II/source/base/CMakeLists.txt index 892456ad89..ab491a5e57 100644 --- a/deal.II/source/base/CMakeLists.txt +++ b/deal.II/source/base/CMakeLists.txt @@ -66,10 +66,15 @@ SET(_src utilities.cc ) +SET(_inst + data_out_base.inst.in + ) + FILE(GLOB _header ${CMAKE_SOURCE_DIR}/include/deal.II/base/*.h ) -DEAL_II_ADD_LIBRARY(obj_base OBJECT ${_src} ${_header} +DEAL_II_ADD_LIBRARY(obj_base OBJECT ${_src} ${_header} ${_inst} ${CMAKE_BINARY_DIR}/include/deal.II/base/config.h ) +EXPAND_INSTANTIATIONS(obj_base "${_inst}") diff --git a/deal.II/source/base/data_out_base.cc b/deal.II/source/base/data_out_base.cc index edb10d95e5..498b9136cd 100644 --- a/deal.II/source/base/data_out_base.cc +++ b/deal.II/source/base/data_out_base.cc @@ -5935,7 +5935,7 @@ void DataOutBase::write_svg (const std::vector > &patches, } } } - + // write the svg file if (width==0) @@ -7894,28 +7894,6 @@ operator >> (std::istream &in, // explicit instantiations -#define INSTANTIATE(dim,spacedim) \ - template class DataOutInterface; \ - template class DataOutReader; \ - template struct DataOutBase::Patch; \ - template \ - std::ostream & \ - operator << (std::ostream &out, \ - const DataOutBase::Patch &patch); \ - template \ - std::istream & \ - operator >> (std::istream &in, \ - DataOutBase::Patch &patch) - -INSTANTIATE(1,1); -INSTANTIATE(2,2); -INSTANTIATE(3,3); -INSTANTIATE(4,4); -INSTANTIATE(1,2); -INSTANTIATE(1,3); -INSTANTIATE(2,3); -INSTANTIATE(3,4); - -#undef INSTANTIATE +#include "data_out_base.inst" DEAL_II_NAMESPACE_CLOSE diff --git a/deal.II/source/base/data_out_base.inst.in b/deal.II/source/base/data_out_base.inst.in new file mode 100644 index 0000000000..e9a094de3a --- /dev/null +++ b/deal.II/source/base/data_out_base.inst.in @@ -0,0 +1,35 @@ +// --------------------------------------------------------------------- +// $Id$ +// +// Copyright (C) 2013 by the deal.II authors +// +// This file is part of the deal.II library. +// +// The deal.II library is free software; you can use it, redistribute +// it, and/or modify it under the terms of the GNU Lesser General +// Public License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// The full text of the license can be found in the file LICENSE at +// the top level of the deal.II distribution. +// +// --------------------------------------------------------------------- + + +for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS) +{ +#if deal_II_dimension <= deal_II_space_dimension + template class DataOutInterface; + template class DataOutReader; + template struct DataOutBase::Patch; + + template + std::ostream & + operator << (std::ostream &out, + const DataOutBase::Patch &patch); + + template + std::istream & + operator >> (std::istream &in, + DataOutBase::Patch &patch); +#endif +} diff --git a/deal.II/source/numerics/data_out_dof_data.inst.in b/deal.II/source/numerics/data_out_dof_data.inst.in index 08ee60879b..ea420b3519 100644 --- a/deal.II/source/numerics/data_out_dof_data.inst.in +++ b/deal.II/source/numerics/data_out_dof_data.inst.in @@ -105,6 +105,7 @@ for (VEC : SERIAL_VECTORS; DH : DOFHANDLER_TEMPLATES; deal_II_dimension : DIMENS // things for DataOutRotation +#if deal_II_dimension < 3 template void DataOut_DoFData,deal_II_dimension+1,deal_II_dimension+1>:: add_data_vector (const VEC &, @@ -143,12 +144,12 @@ for (VEC : SERIAL_VECTORS; DH : DOFHANDLER_TEMPLATES; deal_II_dimension : DIMENS add_data_vector (const DH &, const VEC &, const DataPostprocessor::space_dimension> &); - +#endif // codim 1 - #if deal_II_dimension < 3 +#if deal_II_dimension < 3 template void DataOut_DoFData,deal_II_dimension,deal_II_dimension+1>:: add_data_vector (const VEC &, @@ -187,7 +188,7 @@ for (VEC : SERIAL_VECTORS; DH : DOFHANDLER_TEMPLATES; deal_II_dimension : DIMENS add_data_vector (const DH &, const VEC &, const DataPostprocessor::space_dimension> &); - #endif +#endif @@ -315,6 +316,7 @@ for (DH : DOFHANDLER_TEMPLATES; deal_II_dimension : DIMENSIONS) // things for DataOutRotation +#if deal_II_dimension < 3 template void DataOut_DoFData,deal_II_dimension+1,deal_II_dimension+1>:: add_data_vector (const IndexSet &, @@ -348,10 +350,11 @@ for (DH : DOFHANDLER_TEMPLATES; deal_II_dimension : DIMENSIONS) const IndexSet &, const std::vector &, const std::vector &); +#endif // codim 1 - #if deal_II_dimension < 3 +#if deal_II_dimension < 3 template void DataOut_DoFData,deal_II_dimension,deal_II_dimension+1>:: add_data_vector (const IndexSet &, @@ -370,7 +373,7 @@ for (DH : DOFHANDLER_TEMPLATES; deal_II_dimension : DIMENSIONS) DataOut_DoFData,deal_II_dimension,deal_II_dimension+1>:: add_data_vector (const IndexSet &, const DataPostprocessor::space_dimension> &); - #endif +#endif } @@ -379,21 +382,21 @@ for (DH : DOFHANDLER_TEMPLATES; deal_II_dimension : DIMENSIONS) for (DH : DOFHANDLER_TEMPLATES; deal_II_dimension : DIMENSIONS) { template class DataOut_DoFData,deal_II_dimension>; - template class DataOut_DoFData,deal_II_dimension+1>; - #if deal_II_dimension < 3 +#if deal_II_dimension < 3 + template class DataOut_DoFData,deal_II_dimension+1>; template class DataOut_DoFData,deal_II_dimension,deal_II_dimension+1>; template class DataOut_DoFData,deal_II_dimension,deal_II_dimension+1>; - #endif +#endif - #if deal_II_dimension >= 2 +#if deal_II_dimension >= 2 template class DataOut_DoFData,deal_II_dimension-1,deal_II_dimension>; - #endif +#endif - #if deal_II_dimension == 3 +#if deal_II_dimension == 3 template class DataOut_DoFData,1,3>; template class DataOut_DoFData,1,3>; - #endif +#endif } @@ -416,7 +419,7 @@ for (DH : DOFHANDLER_TEMPLATES; deal_II_dimension : DIMENSIONS; deal_II_space_di namespace DataOut \{ #if deal_II_dimension <= deal_II_space_dimension template - void + void ParallelDataBase:: reinit_all_fe_values > (std::vector > > > &dof_data, diff --git a/deal.II/source/numerics/data_out_rotation.inst.in b/deal.II/source/numerics/data_out_rotation.inst.in index a44a7c69f8..87c868bf7c 100644 --- a/deal.II/source/numerics/data_out_rotation.inst.in +++ b/deal.II/source/numerics/data_out_rotation.inst.in @@ -17,5 +17,7 @@ for (deal_II_dimension : DIMENSIONS) { +#if deal_II_dimension < 3 template class DataOutRotation >; +#endif } diff --git a/deal.II/source/numerics/data_out_stack.inst.in b/deal.II/source/numerics/data_out_stack.inst.in index 67a6ccc773..b3f3bb27ff 100644 --- a/deal.II/source/numerics/data_out_stack.inst.in +++ b/deal.II/source/numerics/data_out_stack.inst.in @@ -17,6 +17,7 @@ for (deal_II_dimension : DIMENSIONS) { +#if deal_II_dimension < 3 template class DataOutStack >; template void DataOutStack >:: @@ -34,4 +35,5 @@ add_data_vector (const Vector &vec, template void DataOutStack >:: add_data_vector (const Vector &vec, const std::string &name); +#endif }