From: Wolfgang Bangerth Date: Sun, 9 Dec 2007 18:54:32 +0000 (+0000) Subject: Generate instantiations automatically X-Git-Tag: v8.0.0~9564 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d277cd2b2515be5490365911b223327d04d30ffb;p=dealii.git Generate instantiations automatically git-svn-id: https://svn.dealii.org/trunk@15580 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/source/block_vector.cc b/deal.II/lac/source/block_vector.cc index 7a889ac1a9..14ee44b6a2 100644 --- a/deal.II/lac/source/block_vector.cc +++ b/deal.II/lac/source/block_vector.cc @@ -15,43 +15,16 @@ DEAL_II_NAMESPACE_OPEN -// explicit instantiations for real data types -template class BlockVector; -template class BlockVector; +#include "block_vector.inst" +// these functions can't be generated by the preprocessor since +// the template arguments need to be different #ifndef DEAL_II_EXPLICIT_CONSTRUCTOR_BUG template BlockVector::BlockVector (const BlockVector &); template BlockVector::BlockVector (const BlockVector &); -#endif - -template void BlockVector::reinit(const BlockVector&, - const bool); -template void BlockVector::reinit(const BlockVector&, - const bool); - -template void BlockVector::reinit(const BlockVector&, - const bool); -template void BlockVector::reinit(const BlockVector&, - const bool); - -// explicit instantiations for complex data types -template class BlockVector >; -template class BlockVector >; -#ifndef DEAL_II_EXPLICIT_CONSTRUCTOR_BUG template BlockVector >::BlockVector (const BlockVector > &); template BlockVector >::BlockVector (const BlockVector > &); #endif -template void BlockVector >::reinit >(const BlockVector >&, - const bool); -template void BlockVector >::reinit >(const BlockVector >&, - const bool); - -template void BlockVector >::reinit >(const BlockVector >&, - const bool); -template void BlockVector >::reinit >(const BlockVector >&, - const bool); - - DEAL_II_NAMESPACE_CLOSE diff --git a/deal.II/lac/source/block_vector.inst.in b/deal.II/lac/source/block_vector.inst.in new file mode 100644 index 0000000000..6a303cd3e2 --- /dev/null +++ b/deal.II/lac/source/block_vector.inst.in @@ -0,0 +1,36 @@ +//--------------------------------------------------------------------------- +// $Id: block_vector.cc 15454 2007-11-06 21:20:29Z bangerth $ +// Version: $Name$ +// +// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 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 (S : REAL_SCALAR) + { + template class BlockVector; + } + +for (S1, S2 : REAL_SCALAR) + { + template void BlockVector::reinit(const BlockVector&, + const bool); + } + + +for (S : COMPLEX_SCALAR) + { + template class BlockVector; + } + +for (S1, S2 : COMPLEX_SCALAR) + { + template void BlockVector::reinit(const BlockVector&, + const bool); + }