From 88ff2573e49593e8a940b8b3fe02efa3d47b158a Mon Sep 17 00:00:00 2001 From: bangerth Date: Sun, 9 Dec 2007 18:54:32 +0000 Subject: [PATCH] Generate instantiations automatically git-svn-id: https://svn.dealii.org/trunk@15580 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/source/block_vector.cc | 33 +++-------------------- deal.II/lac/source/block_vector.inst.in | 36 +++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 30 deletions(-) create mode 100644 deal.II/lac/source/block_vector.inst.in 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); + } -- 2.39.5