From: bangerth Date: Mon, 29 Mar 2010 02:47:17 +0000 (+0000) Subject: Move instantiations to the .inst.in mechanism. This prevents the almost complete... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=25cc16af48bea52c81de897114199a78964657a6;p=dealii-svn.git Move instantiations to the .inst.in mechanism. This prevents the almost complete failure of test runs since r20898 when using PETSc and/or Trilinos. git-svn-id: https://svn.dealii.org/trunk@20913 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/numerics/data_out.cc b/deal.II/deal.II/source/numerics/data_out.cc index 668eeb2a6d..d56923130d 100644 --- a/deal.II/deal.II/source/numerics/data_out.cc +++ b/deal.II/deal.II/source/numerics/data_out.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by the deal.II authors +// 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 @@ -19,6 +19,8 @@ #include #include #include +#include +#include #include #include #include @@ -1104,87 +1106,6 @@ DataOut::next_cell (const typename DataOut::cell_iterator &cell) // explicit instantiations - -#define INSTANTIATE(DH,D0,D1,D2,D3,V) \ -template void \ -DataOut_DoFData,D2,D3>:: \ -add_data_vector (const V &, \ - const std::string &, \ - const DataVectorType, \ - const std::vector &); \ -\ -template void \ - DataOut_DoFData,D2,D3>:: \ -add_data_vector (const V &, \ - const std::vector &, \ - const DataVectorType, \ - const std::vector &); \ -\ -template void \ - DataOut_DoFData,D2,D3>:: \ -add_data_vector (const V &, \ - const DataPostprocessor::space_dimension> &) - -#ifndef DEAL_II_USE_PETSC -# define INSTANTIATE_VECTORS(DH,D0,D1,D2,D3) \ - INSTANTIATE(DH,D0,D1,D2,D3,Vector); \ - INSTANTIATE(DH,D0,D1,D2,D3,Vector); \ - INSTANTIATE(DH,D0,D1,D2,D3,BlockVector) ; \ - INSTANTIATE(DH,D0,D1,D2,D3,BlockVector); \ - INSTANTIATE(DH,D0,D1,D2,D3,Vector); \ - INSTANTIATE(DH,D0,D1,D2,D3,BlockVector) -#else -# define INSTANTIATE_VECTORS(DH,D0,D1,D2,D3) \ - INSTANTIATE(DH,D0,D1,D2,D3,Vector); \ - INSTANTIATE(DH,D0,D1,D2,D3,Vector); \ - INSTANTIATE(DH,D0,D1,D2,D3,BlockVector) ; \ - INSTANTIATE(DH,D0,D1,D2,D3,BlockVector); \ - INSTANTIATE(DH,D0,D1,D2,D3,PETScWrappers::Vector); \ - INSTANTIATE(DH,D0,D1,D2,D3,PETScWrappers::BlockVector) -#endif - -// now do actual instantiations, first for DoFHandler... -template class DataOut_DoFData,deal_II_dimension>; -template class DataOut_DoFData,deal_II_dimension+1>; -INSTANTIATE_VECTORS(DoFHandler,deal_II_dimension,deal_II_dimension,deal_II_dimension,deal_II_dimension); -INSTANTIATE_VECTORS(DoFHandler,deal_II_dimension,deal_II_dimension,deal_II_dimension+1,deal_II_dimension+1); - -// for 3d, also generate an extra class -#if deal_II_dimension >= 2 -template class DataOut_DoFData,deal_II_dimension-1,deal_II_dimension>; -INSTANTIATE_VECTORS(DoFHandler,deal_II_dimension,deal_II_dimension,deal_II_dimension-1,deal_II_dimension); -#endif - -template class DataOut >; - - -// ...and now for hp::DoFHandler -template class DataOut_DoFData,deal_II_dimension>; -template class DataOut_DoFData,deal_II_dimension+1>; -INSTANTIATE_VECTORS(hp::DoFHandler,deal_II_dimension,deal_II_dimension,deal_II_dimension,deal_II_dimension); -INSTANTIATE_VECTORS(hp::DoFHandler,deal_II_dimension,deal_II_dimension,deal_II_dimension+1,deal_II_dimension+1); - -#if deal_II_dimension >= 2 -template class DataOut_DoFData,deal_II_dimension-1,deal_II_dimension>; -INSTANTIATE_VECTORS(hp::DoFHandler,deal_II_dimension,deal_II_dimension,deal_II_dimension-1,deal_II_dimension); -#endif - -template class DataOut >; - - -#if deal_II_dimension == 2 || deal_II_dimension ==1 -// now do actual instantiations, first for DoFHandler... -template class DataOut_DoFData,deal_II_dimension, deal_II_dimension+1>; -template class DataOut_DoFData,deal_II_dimension+1, deal_II_dimension+1>; - -INSTANTIATE_VECTORS(DoFHandler,deal_II_dimension,deal_II_dimension+1,deal_II_dimension,deal_II_dimension+1); -INSTANTIATE_VECTORS(DoFHandler,deal_II_dimension,deal_II_dimension+1,deal_II_dimension+1,deal_II_dimension+1); - -template class DataOut >; -#endif - - -#undef INSTANTIATE -#undef INSTANTIATE_VECTORS +#include "data_out.inst" DEAL_II_NAMESPACE_CLOSE diff --git a/deal.II/deal.II/source/numerics/data_out.inst.in b/deal.II/deal.II/source/numerics/data_out.inst.in new file mode 100644 index 0000000000..63002e639a --- /dev/null +++ b/deal.II/deal.II/source/numerics/data_out.inst.in @@ -0,0 +1,74 @@ +//--------------------------------------------------------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 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 (VEC : SERIAL_VECTORS; DH : DOFHANDLER_TEMPLATES) +{ +// codim=0 + + template void + DataOut_DoFData,deal_II_dimension,deal_II_dimension>:: + add_data_vector (const VEC &, + const std::string &, + const DataVectorType, + const std::vector &); + + template void + DataOut_DoFData,deal_II_dimension,deal_II_dimension>:: + add_data_vector (const VEC &, + const std::vector &, + const DataVectorType, + const std::vector &); + + template void + DataOut_DoFData,deal_II_dimension,deal_II_dimension>:: + add_data_vector (const VEC &, + const DataPostprocessor::space_dimension> &); + +// codim=1 + + template void + DataOut_DoFData,deal_II_dimension+1,deal_II_dimension+1>:: + add_data_vector (const VEC &, + const std::string &, + const DataVectorType, + const std::vector &); + + template void + DataOut_DoFData,deal_II_dimension+1,deal_II_dimension+1>:: + add_data_vector (const VEC &, + const std::vector &, + const DataVectorType, + const std::vector &); + + template void + DataOut_DoFData,deal_II_dimension+1,deal_II_dimension+1>:: + add_data_vector (const VEC &, + const DataPostprocessor::space_dimension> &); + +} + + +for (DH : DOFHANDLER_TEMPLATES) +{ + template class DataOut_DoFData,deal_II_dimension>; + template class DataOut_DoFData,deal_II_dimension+1>; + + #if deal_II_dimension < 3 + template class DataOut_DoFData,deal_II_dimension,deal_II_dimension+1>; + #endif + + template class DataOut >; + #if deal_II_dimension < 3 + template class DataOut >; + #endif +}