From 559bcbf74f944a4ea5b0e23e7280fcffbc159120 Mon Sep 17 00:00:00 2001 From: bangerth Date: Sun, 9 Dec 2007 18:36:33 +0000 Subject: [PATCH] Generate instantiations automatically. git-svn-id: https://svn.dealii.org/trunk@15579 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/source/precondition_block.cc | 187 +----------------- deal.II/lac/source/precondition_block.inst.in | 79 ++++++++ 2 files changed, 81 insertions(+), 185 deletions(-) create mode 100644 deal.II/lac/source/precondition_block.inst.in diff --git a/deal.II/lac/source/precondition_block.cc b/deal.II/lac/source/precondition_block.cc index a5d8dd40af..6305abd172 100644 --- a/deal.II/lac/source/precondition_block.cc +++ b/deal.II/lac/source/precondition_block.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2005, 2006 by the deal.II authors +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 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 @@ -16,188 +16,5 @@ #include DEAL_II_NAMESPACE_OPEN - - -// explicit instantiations for "float" PreconditionBlock -template class PreconditionBlock, float>; - -// the instantiation for class PreconditionBlock, double> is skipped -// because it does not make sense to have inverse block matrices with -// higher precision than the matrix itself - - -// explicit instantiations for "double" PreconditionBlock -template class PreconditionBlock, float>; - -template class PreconditionBlock, double>; - - -/*--------------------- PreconditionBlockJacobi -----------------------*/ - - -// explicit instantiations for "float" PreconditionBlock -template class PreconditionBlockJacobi, float>; - -template void PreconditionBlockJacobi, float>::vmult -(Vector &, const Vector &) const; -template void PreconditionBlockJacobi, float>::vmult -(Vector &, const Vector &) const; -template void PreconditionBlockJacobi, float>::Tvmult -(Vector &, const Vector &) const; -template void PreconditionBlockJacobi, float>::Tvmult -(Vector &, const Vector &) const; -template void PreconditionBlockJacobi, float>::vmult_add -(Vector &, const Vector &) const; -template void PreconditionBlockJacobi, float>::vmult_add -(Vector &, const Vector &) const; -template void PreconditionBlockJacobi, float>::Tvmult_add -(Vector &, const Vector &) const; -template void PreconditionBlockJacobi, float>::Tvmult_add -(Vector &, const Vector &) const; - -template class PreconditionBlockJacobi, float>; - -template void PreconditionBlockJacobi, float>::vmult -(Vector &, const Vector &) const; -template void PreconditionBlockJacobi, float>::vmult -(Vector &, const Vector &) const; -template void PreconditionBlockJacobi, float>::Tvmult -(Vector &, const Vector &) const; -template void PreconditionBlockJacobi, float>::Tvmult -(Vector &, const Vector &) const; -template void PreconditionBlockJacobi, float>::vmult_add -(Vector &, const Vector &) const; -template void PreconditionBlockJacobi, float>::vmult_add -(Vector &, const Vector &) const; -template void PreconditionBlockJacobi, float>::Tvmult_add -(Vector &, const Vector &) const; -template void PreconditionBlockJacobi, float>::Tvmult_add -(Vector &, const Vector &) const; - -template class PreconditionBlockJacobi, double>; - -template void PreconditionBlockJacobi, double>::vmult -(Vector &, const Vector &) const; -template void PreconditionBlockJacobi, double>::vmult -(Vector &, const Vector &) const; -template void PreconditionBlockJacobi, double>::Tvmult -(Vector &, const Vector &) const; -template void PreconditionBlockJacobi, double>::Tvmult -(Vector &, const Vector &) const; -template void PreconditionBlockJacobi, double>::vmult_add -(Vector &, const Vector &) const; -template void PreconditionBlockJacobi, double>::vmult_add -(Vector &, const Vector &) const; -template void PreconditionBlockJacobi, double>::Tvmult_add -(Vector &, const Vector &) const; -template void PreconditionBlockJacobi, double>::Tvmult_add -(Vector &, const Vector &) const; - -/*--------------------- PreconditionBlockGaussSeidel -----------------------*/ - - -// explicit instantiations for "float" PreconditionBlock -template class PreconditionBlockSOR, float>; - -template void PreconditionBlockSOR, float>::vmult ( - Vector &, const Vector &) const; -template void PreconditionBlockSOR, float>::vmult ( - Vector &, const Vector &) const; -template void PreconditionBlockSOR, float>::Tvmult ( - Vector &, const Vector &) const; -template void PreconditionBlockSOR, float>::Tvmult ( - Vector &, const Vector &) const; - - -// the instantiation for class PreconditionBlockSOR, double> is skipped -// because it does not make sense to have inverse block matrices with -// higher precision than the matrix itself - - -// explicit instantiations for "double" PreconditionBlockSOR -template class PreconditionBlockSOR, float>; - - -template void PreconditionBlockSOR, float>::vmult ( - Vector &, const Vector &) const; -template void PreconditionBlockSOR, float>::vmult ( - Vector &, const Vector &) const; -template void PreconditionBlockSOR, float>::Tvmult ( - Vector &, const Vector &) const; -template void PreconditionBlockSOR, float>::Tvmult ( - Vector &, const Vector &) const; -template void PreconditionBlockSOR, float>::vmult_add ( - Vector &, const Vector &) const; -template void PreconditionBlockSOR, float>::vmult_add ( - Vector &, const Vector &) const; -template void PreconditionBlockSOR, float>::Tvmult_add ( - Vector &, const Vector &) const; -template void PreconditionBlockSOR, float>::Tvmult_add ( - Vector &, const Vector &) const; - -template class PreconditionBlockSOR, double>; - -template void PreconditionBlockSOR, double>::vmult ( - Vector &, const Vector &) const; -template void PreconditionBlockSOR, double>::vmult ( - Vector &, const Vector &) const; -template void PreconditionBlockSOR, double>::Tvmult ( - Vector &, const Vector &) const; -template void PreconditionBlockSOR, double>::Tvmult ( - Vector &, const Vector &) const; -template void PreconditionBlockSOR, double>::vmult_add ( - Vector &, const Vector &) const; -template void PreconditionBlockSOR, double>::vmult_add ( - Vector &, const Vector &) const; -template void PreconditionBlockSOR, double>::Tvmult_add ( - Vector &, const Vector &) const; -template void PreconditionBlockSOR, double>::Tvmult_add ( - Vector &, const Vector &) const; - - -/*--------------------- PreconditionBlockSSOR -----------------------*/ - - -// explicit instantiations for "float" PreconditionBlock -template class PreconditionBlockSSOR, float>; - -template void PreconditionBlockSSOR, float>::vmult ( - Vector &, const Vector &) const; -template void PreconditionBlockSSOR, float>::vmult ( - Vector &, const Vector &) const; -template void PreconditionBlockSSOR, float>::Tvmult ( - Vector &, const Vector &) const; -template void PreconditionBlockSSOR, float>::Tvmult ( - Vector &, const Vector &) const; - - -// the instantiation for class PreconditionBlockSSOR, double> is skipped -// because it does not make sense to have inverse block matrices with -// higher precision than the matrix itself - - -// explicit instantiations for "double" PreconditionBlockSSOR -template class PreconditionBlockSSOR, float>; - - -template void PreconditionBlockSSOR, float>::vmult ( - Vector &, const Vector &) const; -template void PreconditionBlockSSOR, float>::vmult ( - Vector &, const Vector &) const; -template void PreconditionBlockSSOR, float>::Tvmult ( - Vector &, const Vector &) const; -template void PreconditionBlockSSOR, float>::Tvmult ( - Vector &, const Vector &) const; - -template class PreconditionBlockSSOR, double>; - -template void PreconditionBlockSSOR, double>::vmult ( - Vector &, const Vector &) const; -template void PreconditionBlockSSOR, double>::vmult ( - Vector &, const Vector &) const; -template void PreconditionBlockSSOR, double>::Tvmult ( - Vector &, const Vector &) const; -template void PreconditionBlockSSOR, double>::Tvmult ( - Vector &, const Vector &) const; - +#include "precondition_block.inst" DEAL_II_NAMESPACE_CLOSE diff --git a/deal.II/lac/source/precondition_block.inst.in b/deal.II/lac/source/precondition_block.inst.in new file mode 100644 index 0000000000..f2df344631 --- /dev/null +++ b/deal.II/lac/source/precondition_block.inst.in @@ -0,0 +1,79 @@ +//--------------------------------------------------------------------------- +// $Id: precondition_block.cc 14038 2006-10-23 02:46:34Z bangerth $ +// Version: $Name$ +// +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 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 (S1, S2 : REAL_SCALAR) + { + template class PreconditionBlock, S2>; + +// ------------ PreconditionBlockJacobi ----------------- + template class PreconditionBlockJacobi, S2>; + + template + void PreconditionBlockJacobi, S2>::vmult + (Vector &, const Vector &) const; + template + void PreconditionBlockJacobi, S2>::vmult + (Vector &, const Vector &) const; + template + void PreconditionBlockJacobi, S2>::Tvmult + (Vector &, const Vector &) const; + template + void PreconditionBlockJacobi, S2>::Tvmult + (Vector &, const Vector &) const; + template + void PreconditionBlockJacobi, S2>::vmult_add + (Vector &, const Vector &) const; + template + void PreconditionBlockJacobi, S2>::vmult_add + (Vector &, const Vector &) const; + template + void PreconditionBlockJacobi, S2>::Tvmult_add + (Vector &, const Vector &) const; + template + void PreconditionBlockJacobi, S2>::Tvmult_add + (Vector &, const Vector &) const; + +// ------------ PreconditionBlockSOR ----------------- + template class PreconditionBlockSOR, S2>; + + template + void PreconditionBlockSOR, S2>::vmult + (Vector &, const Vector &) const; + template + void PreconditionBlockSOR, S2>::vmult + (Vector &, const Vector &) const; + template + void PreconditionBlockSOR, S2>::Tvmult + (Vector &, const Vector &) const; + template + void PreconditionBlockSOR, S2>::Tvmult + (Vector &, const Vector &) const; + +// ------------ PreconditionBlockSSOR ----------------- + template class PreconditionBlockSSOR, S2>; + + template + void PreconditionBlockSSOR, S2>::vmult + (Vector &, const Vector &) const; + template + void PreconditionBlockSSOR, S2>::vmult + (Vector &, const Vector &) const; + template + void PreconditionBlockSSOR, S2>::Tvmult + (Vector &, const Vector &) const; + template + void PreconditionBlockSSOR, S2>::Tvmult + (Vector &, const Vector &) const; + } + -- 2.39.5