From b00d4f59a67130fad52c24b4e1b8eee465affbd3 Mon Sep 17 00:00:00 2001 From: bangerth Date: Sun, 9 Dec 2007 18:29:00 +0000 Subject: [PATCH] Generate instantiations for SparseMatrixEZ automatically. git-svn-id: https://svn.dealii.org/trunk@15578 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/source/sparse_matrix_ez.cc | 20 ++ deal.II/lac/source/sparse_matrix_ez.double.cc | 41 --- deal.II/lac/source/sparse_matrix_ez.float.cc | 40 --- deal.II/lac/source/sparse_matrix_ez.inst | 270 ++++++++++++++++++ deal.II/lac/source/sparse_matrix_ez.inst.in | 46 +++ .../lac/source/sparse_matrix_ez_vector.in.h | 67 ----- 6 files changed, 336 insertions(+), 148 deletions(-) create mode 100644 deal.II/lac/source/sparse_matrix_ez.cc delete mode 100644 deal.II/lac/source/sparse_matrix_ez.double.cc delete mode 100644 deal.II/lac/source/sparse_matrix_ez.float.cc create mode 100644 deal.II/lac/source/sparse_matrix_ez.inst create mode 100644 deal.II/lac/source/sparse_matrix_ez.inst.in delete mode 100644 deal.II/lac/source/sparse_matrix_ez_vector.in.h diff --git a/deal.II/lac/source/sparse_matrix_ez.cc b/deal.II/lac/source/sparse_matrix_ez.cc new file mode 100644 index 0000000000..b83a856f4c --- /dev/null +++ b/deal.II/lac/source/sparse_matrix_ez.cc @@ -0,0 +1,20 @@ +//--------------------------------------------------------------------------- +// $Id: sparse_matrix_ez.double.cc 14038 2006-10-23 02:46:34Z bangerth $ +// Version: $Name$ +// +// Copyright (C) 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. +// +//--------------------------------------------------------------------------- + + +#include +#include + +DEAL_II_NAMESPACE_OPEN +#include "sparse_matrix_ez.inst" +DEAL_II_NAMESPACE_CLOSE diff --git a/deal.II/lac/source/sparse_matrix_ez.double.cc b/deal.II/lac/source/sparse_matrix_ez.double.cc deleted file mode 100644 index 9be705996d..0000000000 --- a/deal.II/lac/source/sparse_matrix_ez.double.cc +++ /dev/null @@ -1,41 +0,0 @@ -//--------------------------------------------------------------------------- -// $Id$ -// Version: $Name$ -// -// Copyright (C) 2003, 2005, 2006 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. -// -//--------------------------------------------------------------------------- - - -#include -#include -#include - -#define TYPEMAT double - -DEAL_II_NAMESPACE_OPEN -template class SparseMatrixEZ; -DEAL_II_NAMESPACE_CLOSE - - -#define TYPEVEC float -#include "sparse_matrix_ez_vector.in.h" -#undef TYPEVEC - -#define TYPEVEC double -#include "sparse_matrix_ez_vector.in.h" -#undef TYPEVEC - - // a prerelease of gcc3.0 fails to - // compile this due to long double -// #undef TYPE2 -// #define TYPE2 long double - -// #include - -#undef TYPEMAT diff --git a/deal.II/lac/source/sparse_matrix_ez.float.cc b/deal.II/lac/source/sparse_matrix_ez.float.cc deleted file mode 100644 index 636e7f2147..0000000000 --- a/deal.II/lac/source/sparse_matrix_ez.float.cc +++ /dev/null @@ -1,40 +0,0 @@ -//--------------------------------------------------------------------------- -// $Id$ -// Version: $Name$ -// -// Copyright (C) 2003, 2005, 2006 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. -// -//--------------------------------------------------------------------------- - - -#include -#include -#include - -#define TYPEMAT float - -DEAL_II_NAMESPACE_OPEN -template class SparseMatrixEZ; -DEAL_II_NAMESPACE_CLOSE - -#define TYPEVEC float -#include "sparse_matrix_ez_vector.in.h" -#undef TYPEVEC - -#define TYPEVEC double -#include "sparse_matrix_ez_vector.in.h" -#undef TYPEVEC - - // a prerelease of gcc3.0 fails to - // compile this due to long double -// #undef TYPE2 -// #define TYPE2 long double - -// #include - -#undef TYPEMAT diff --git a/deal.II/lac/source/sparse_matrix_ez.inst b/deal.II/lac/source/sparse_matrix_ez.inst new file mode 100644 index 0000000000..06680c0d45 --- /dev/null +++ b/deal.II/lac/source/sparse_matrix_ez.inst @@ -0,0 +1,270 @@ +template + void SparseMatrixEZ< double >::vmult< double > (Vector< double > &, + const Vector< double > &) const; + template + void SparseMatrixEZ< double >::Tvmult< double > (Vector< double > &, + const Vector< double > &) const; + template + void SparseMatrixEZ< double >::vmult_add< double > (Vector< double > &, + const Vector< double > &) const; + template + void SparseMatrixEZ< double >::Tvmult_add< double > (Vector< double > &, + const Vector< double > &) const; + + template + void SparseMatrixEZ< double >::precondition_SSOR< double > (Vector< double > &, + const Vector< double > &, + const double ) const; + template + void SparseMatrixEZ< double >::precondition_SOR< double > (Vector< double > &, + const Vector< double > &, + const double ) const; + template + void SparseMatrixEZ< double >::precondition_TSOR< double > (Vector< double > &, + const Vector< double > &, + const double ) const; + template + void SparseMatrixEZ< double >::precondition_Jacobi< double > (Vector< double > &, + const Vector< double > &, + const double ) const; + +template + void SparseMatrixEZ< double >::vmult< float > (Vector< float > &, + const Vector< float > &) const; + template + void SparseMatrixEZ< double >::Tvmult< float > (Vector< float > &, + const Vector< float > &) const; + template + void SparseMatrixEZ< double >::vmult_add< float > (Vector< float > &, + const Vector< float > &) const; + template + void SparseMatrixEZ< double >::Tvmult_add< float > (Vector< float > &, + const Vector< float > &) const; + + template + void SparseMatrixEZ< double >::precondition_SSOR< float > (Vector< float > &, + const Vector< float > &, + const double ) const; + template + void SparseMatrixEZ< double >::precondition_SOR< float > (Vector< float > &, + const Vector< float > &, + const double ) const; + template + void SparseMatrixEZ< double >::precondition_TSOR< float > (Vector< float > &, + const Vector< float > &, + const double ) const; + template + void SparseMatrixEZ< double >::precondition_Jacobi< float > (Vector< float > &, + const Vector< float > &, + const double ) const; + +template + void SparseMatrixEZ< double >::vmult< long double > (Vector< long double > &, + const Vector< long double > &) const; + template + void SparseMatrixEZ< double >::Tvmult< long double > (Vector< long double > &, + const Vector< long double > &) const; + template + void SparseMatrixEZ< double >::vmult_add< long double > (Vector< long double > &, + const Vector< long double > &) const; + template + void SparseMatrixEZ< double >::Tvmult_add< long double > (Vector< long double > &, + const Vector< long double > &) const; + + template + void SparseMatrixEZ< double >::precondition_SSOR< long double > (Vector< long double > &, + const Vector< long double > &, + const double ) const; + template + void SparseMatrixEZ< double >::precondition_SOR< long double > (Vector< long double > &, + const Vector< long double > &, + const double ) const; + template + void SparseMatrixEZ< double >::precondition_TSOR< long double > (Vector< long double > &, + const Vector< long double > &, + const double ) const; + template + void SparseMatrixEZ< double >::precondition_Jacobi< long double > (Vector< long double > &, + const Vector< long double > &, + const double ) const; + +template + void SparseMatrixEZ< float >::vmult< double > (Vector< double > &, + const Vector< double > &) const; + template + void SparseMatrixEZ< float >::Tvmult< double > (Vector< double > &, + const Vector< double > &) const; + template + void SparseMatrixEZ< float >::vmult_add< double > (Vector< double > &, + const Vector< double > &) const; + template + void SparseMatrixEZ< float >::Tvmult_add< double > (Vector< double > &, + const Vector< double > &) const; + + template + void SparseMatrixEZ< float >::precondition_SSOR< double > (Vector< double > &, + const Vector< double > &, + const float ) const; + template + void SparseMatrixEZ< float >::precondition_SOR< double > (Vector< double > &, + const Vector< double > &, + const float ) const; + template + void SparseMatrixEZ< float >::precondition_TSOR< double > (Vector< double > &, + const Vector< double > &, + const float ) const; + template + void SparseMatrixEZ< float >::precondition_Jacobi< double > (Vector< double > &, + const Vector< double > &, + const float ) const; + +template + void SparseMatrixEZ< float >::vmult< float > (Vector< float > &, + const Vector< float > &) const; + template + void SparseMatrixEZ< float >::Tvmult< float > (Vector< float > &, + const Vector< float > &) const; + template + void SparseMatrixEZ< float >::vmult_add< float > (Vector< float > &, + const Vector< float > &) const; + template + void SparseMatrixEZ< float >::Tvmult_add< float > (Vector< float > &, + const Vector< float > &) const; + + template + void SparseMatrixEZ< float >::precondition_SSOR< float > (Vector< float > &, + const Vector< float > &, + const float ) const; + template + void SparseMatrixEZ< float >::precondition_SOR< float > (Vector< float > &, + const Vector< float > &, + const float ) const; + template + void SparseMatrixEZ< float >::precondition_TSOR< float > (Vector< float > &, + const Vector< float > &, + const float ) const; + template + void SparseMatrixEZ< float >::precondition_Jacobi< float > (Vector< float > &, + const Vector< float > &, + const float ) const; + +template + void SparseMatrixEZ< float >::vmult< long double > (Vector< long double > &, + const Vector< long double > &) const; + template + void SparseMatrixEZ< float >::Tvmult< long double > (Vector< long double > &, + const Vector< long double > &) const; + template + void SparseMatrixEZ< float >::vmult_add< long double > (Vector< long double > &, + const Vector< long double > &) const; + template + void SparseMatrixEZ< float >::Tvmult_add< long double > (Vector< long double > &, + const Vector< long double > &) const; + + template + void SparseMatrixEZ< float >::precondition_SSOR< long double > (Vector< long double > &, + const Vector< long double > &, + const float ) const; + template + void SparseMatrixEZ< float >::precondition_SOR< long double > (Vector< long double > &, + const Vector< long double > &, + const float ) const; + template + void SparseMatrixEZ< float >::precondition_TSOR< long double > (Vector< long double > &, + const Vector< long double > &, + const float ) const; + template + void SparseMatrixEZ< float >::precondition_Jacobi< long double > (Vector< long double > &, + const Vector< long double > &, + const float ) const; + +template + void SparseMatrixEZ< long double >::vmult< double > (Vector< double > &, + const Vector< double > &) const; + template + void SparseMatrixEZ< long double >::Tvmult< double > (Vector< double > &, + const Vector< double > &) const; + template + void SparseMatrixEZ< long double >::vmult_add< double > (Vector< double > &, + const Vector< double > &) const; + template + void SparseMatrixEZ< long double >::Tvmult_add< double > (Vector< double > &, + const Vector< double > &) const; + + template + void SparseMatrixEZ< long double >::precondition_SSOR< double > (Vector< double > &, + const Vector< double > &, + const long double ) const; + template + void SparseMatrixEZ< long double >::precondition_SOR< double > (Vector< double > &, + const Vector< double > &, + const long double ) const; + template + void SparseMatrixEZ< long double >::precondition_TSOR< double > (Vector< double > &, + const Vector< double > &, + const long double ) const; + template + void SparseMatrixEZ< long double >::precondition_Jacobi< double > (Vector< double > &, + const Vector< double > &, + const long double ) const; + +template + void SparseMatrixEZ< long double >::vmult< float > (Vector< float > &, + const Vector< float > &) const; + template + void SparseMatrixEZ< long double >::Tvmult< float > (Vector< float > &, + const Vector< float > &) const; + template + void SparseMatrixEZ< long double >::vmult_add< float > (Vector< float > &, + const Vector< float > &) const; + template + void SparseMatrixEZ< long double >::Tvmult_add< float > (Vector< float > &, + const Vector< float > &) const; + + template + void SparseMatrixEZ< long double >::precondition_SSOR< float > (Vector< float > &, + const Vector< float > &, + const long double ) const; + template + void SparseMatrixEZ< long double >::precondition_SOR< float > (Vector< float > &, + const Vector< float > &, + const long double ) const; + template + void SparseMatrixEZ< long double >::precondition_TSOR< float > (Vector< float > &, + const Vector< float > &, + const long double ) const; + template + void SparseMatrixEZ< long double >::precondition_Jacobi< float > (Vector< float > &, + const Vector< float > &, + const long double ) const; + +template + void SparseMatrixEZ< long double >::vmult< long double > (Vector< long double > &, + const Vector< long double > &) const; + template + void SparseMatrixEZ< long double >::Tvmult< long double > (Vector< long double > &, + const Vector< long double > &) const; + template + void SparseMatrixEZ< long double >::vmult_add< long double > (Vector< long double > &, + const Vector< long double > &) const; + template + void SparseMatrixEZ< long double >::Tvmult_add< long double > (Vector< long double > &, + const Vector< long double > &) const; + + template + void SparseMatrixEZ< long double >::precondition_SSOR< long double > (Vector< long double > &, + const Vector< long double > &, + const long double ) const; + template + void SparseMatrixEZ< long double >::precondition_SOR< long double > (Vector< long double > &, + const Vector< long double > &, + const long double ) const; + template + void SparseMatrixEZ< long double >::precondition_TSOR< long double > (Vector< long double > &, + const Vector< long double > &, + const long double ) const; + template + void SparseMatrixEZ< long double >::precondition_Jacobi< long double > (Vector< long double > &, + const Vector< long double > &, + const long double ) const; + diff --git a/deal.II/lac/source/sparse_matrix_ez.inst.in b/deal.II/lac/source/sparse_matrix_ez.inst.in new file mode 100644 index 0000000000..3ad2e839cc --- /dev/null +++ b/deal.II/lac/source/sparse_matrix_ez.inst.in @@ -0,0 +1,46 @@ +//---------------------------- sparse_matrix_ez.inst.in --------------------------- +// $Id: sparse_matrix_ez_vector.in.h 14038 2006-10-23 02:46:34Z bangerth $ +// Version: $Name$ +// +// Copyright (C) 2002, 2003, 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. +// +//---------------------------- sparse_matrix_ez.inst.in --------------------------- + +for (S1, S2 : REAL_SCALARS) + { + template + void SparseMatrixEZ::vmult (Vector &, + const Vector &) const; + template + void SparseMatrixEZ::Tvmult (Vector &, + const Vector &) const; + template + void SparseMatrixEZ::vmult_add (Vector &, + const Vector &) const; + template + void SparseMatrixEZ::Tvmult_add (Vector &, + const Vector &) const; + + template + void SparseMatrixEZ::precondition_SSOR (Vector &, + const Vector &, + const S1) const; + template + void SparseMatrixEZ::precondition_SOR (Vector &, + const Vector &, + const S1) const; + template + void SparseMatrixEZ::precondition_TSOR (Vector &, + const Vector &, + const S1) const; + template + void SparseMatrixEZ::precondition_Jacobi (Vector &, + const Vector &, + const S1) const; + } + diff --git a/deal.II/lac/source/sparse_matrix_ez_vector.in.h b/deal.II/lac/source/sparse_matrix_ez_vector.in.h deleted file mode 100644 index 067abbe80f..0000000000 --- a/deal.II/lac/source/sparse_matrix_ez_vector.in.h +++ /dev/null @@ -1,67 +0,0 @@ -//---------------------------- sparse_matrix_ez.2.templates --------------------------- -// $Id$ -// Version: $Name$ -// -// Copyright (C) 2002, 2003, 2006 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. -// -//---------------------------- sparse_matrix_ez.2.templates --------------------------- - - -// File copied from sparse_matrix.2.templates and modified - -// Driver file for SparseMatrixEZ functions with two types. - -// TYPEMAT and TYPEVEC are defined in sparse_matrix_ez?.cc - -DEAL_II_NAMESPACE_OPEN - -template void SparseMatrixEZ::vmult ( - Vector &, - const Vector &) const; -template void SparseMatrixEZ::Tvmult ( - Vector &, - const Vector &) const; -template void SparseMatrixEZ::vmult_add ( - Vector &, - const Vector &) const; -template void SparseMatrixEZ::Tvmult_add ( - Vector &, - const Vector &) const; - -//template TYPEVEC -//SparseMatrixEZ::matrix_norm_square (const Vector &) const; - -//template TYPEVEC -//SparseMatrixEZ::matrix_scalar_product (const Vector &, -// const Vector &) const; - -//template TYPEVEC SparseMatrixEZ::residual (Vector &, -// const Vector &, -// const Vector &) const; - -template void SparseMatrixEZ::precondition_SSOR ( - Vector &, - const Vector &, - const TYPEMAT) const; - -template void SparseMatrixEZ::precondition_SOR ( - Vector &, - const Vector &, - const TYPEMAT) const; - -template void SparseMatrixEZ::precondition_TSOR ( - Vector &, - const Vector &, - const TYPEMAT) const; - -template void SparseMatrixEZ::precondition_Jacobi ( - Vector &, - const Vector &, - const TYPEMAT) const; - -DEAL_II_NAMESPACE_CLOSE -- 2.39.5