From 8cc0dd716dea91ba81648f3dac375fab714b9995 Mon Sep 17 00:00:00 2001 From: guido Date: Fri, 30 May 2003 18:24:55 +0000 Subject: [PATCH] driver file moved and TYPE2 renamed to clearer TYPEVEC git-svn-id: https://svn.dealii.org/trunk@7687 0785d39b-7218-0410-832d-ea1e28bc413d --- .../lac/include/lac/sparse_matrix.2.templates | 88 ------------------- deal.II/lac/source/sparse_matrix.double.cc | 16 ++-- deal.II/lac/source/sparse_matrix.float.cc | 19 ++-- deal.II/lac/source/sparse_matrix.in.h | 65 ++++++++++++++ 4 files changed, 83 insertions(+), 105 deletions(-) delete mode 100644 deal.II/lac/include/lac/sparse_matrix.2.templates create mode 100644 deal.II/lac/source/sparse_matrix.in.h diff --git a/deal.II/lac/include/lac/sparse_matrix.2.templates b/deal.II/lac/include/lac/sparse_matrix.2.templates deleted file mode 100644 index 0f664b8a34..0000000000 --- a/deal.II/lac/include/lac/sparse_matrix.2.templates +++ /dev/null @@ -1,88 +0,0 @@ -//---------------------------- sparse_matrix.2.templates --------------------------- -// $Id$ -// Version: $Name$ -// -// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 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.2.templates --------------------------- - - -// Driver file for SparseMatrix functions with two types. - -// TYPEMAT and TYPE2 are defined in sparsematrix?.cc - -template SparseMatrix & -SparseMatrix::copy_from (const SparseMatrix &); - -template -void SparseMatrix::copy_from (const FullMatrix &); - -template void SparseMatrix::add_scaled (const TYPEMAT, - const SparseMatrix &); - -template void SparseMatrix::vmult (Vector &, - const Vector &) const; -template void SparseMatrix::Tvmult (Vector &, - const Vector &) const; -template void SparseMatrix::vmult_add (Vector &, - const Vector &) const; -template void SparseMatrix::Tvmult_add (Vector &, - const Vector &) const; - -template TYPE2 -SparseMatrix::matrix_norm_square (const Vector &) const; - -template TYPE2 -SparseMatrix::matrix_scalar_product (const Vector &, - const Vector &) const; - -template TYPE2 SparseMatrix::residual (Vector &, - const Vector &, - const Vector &) const; - -template void SparseMatrix::precondition_SSOR (Vector &, - const Vector &, - const TYPEMAT) const; - -template void SparseMatrix::precondition_SOR (Vector &, - const Vector &, - const TYPEMAT) const; - -template void SparseMatrix::precondition_TSOR (Vector &, - const Vector &, - const TYPEMAT) const; - -template void SparseMatrix::precondition_Jacobi (Vector &, - const Vector &, - const TYPEMAT) const; - -template void SparseMatrix::SOR (Vector &, - const TYPEMAT) const; -template void SparseMatrix::TSOR (Vector &, - const TYPEMAT) const; -template void SparseMatrix::SSOR (Vector &, - const TYPEMAT) const; -template void SparseMatrix::PSOR ( - Vector &, - const std::vector&, - const std::vector&, - const TYPEMAT) const; -template void SparseMatrix::TPSOR ( - Vector &, - const std::vector&, - const std::vector&, - const TYPEMAT) const; -template void SparseMatrix::SOR_step (Vector &, const Vector &, - const TYPEMAT) const; -template void SparseMatrix::TSOR_step (Vector &, - const Vector &, - const TYPEMAT) const; -template void SparseMatrix::SSOR_step (Vector &, - const Vector &, - const TYPEMAT) const; - diff --git a/deal.II/lac/source/sparse_matrix.double.cc b/deal.II/lac/source/sparse_matrix.double.cc index 261e7fd653..bec54b5bd0 100644 --- a/deal.II/lac/source/sparse_matrix.double.cc +++ b/deal.II/lac/source/sparse_matrix.double.cc @@ -18,21 +18,21 @@ template class SparseMatrix; -#define TYPE2 float +#define TYPEVEC float -#include +#include "sparse_matrix.in.h" -#undef TYPE2 -#define TYPE2 double +#undef TYPEVEC +#define TYPEVEC double -#include +#include "sparse_matrix.in.h" // a prerelease of gcc3.0 fails to // compile this due to long double -// #undef TYPE2 -// #define TYPE2 long double +// #undef TYPEVEC +// #define TYPEVEC long double // #include -#undef TYPE2 +#undef TYPEVEC #undef TYPEMAT diff --git a/deal.II/lac/source/sparse_matrix.float.cc b/deal.II/lac/source/sparse_matrix.float.cc index 633398e92d..c5baea8a8e 100644 --- a/deal.II/lac/source/sparse_matrix.float.cc +++ b/deal.II/lac/source/sparse_matrix.float.cc @@ -14,24 +14,25 @@ #include - #define TYPEMAT float template class SparseMatrix; +#define TYPEVEC float -#define TYPE2 float - -#include +#include "sparse_matrix.in.h" -#undef TYPE2 -#define TYPE2 double +#undef TYPEVEC +#define TYPEVEC double -#include +#include "sparse_matrix.in.h" // a prerelease of gcc3.0 fails to // compile this due to long double -// #undef TYPE2 -// #define TYPE2 long double +// #undef TYPEVEC +// #define TYPEVEC long double // #include + +#undef TYPEVEC +#undef TYPEMAT diff --git a/deal.II/lac/source/sparse_matrix.in.h b/deal.II/lac/source/sparse_matrix.in.h new file mode 100644 index 0000000000..4417d0d7dd --- /dev/null +++ b/deal.II/lac/source/sparse_matrix.in.h @@ -0,0 +1,65 @@ +//--------------------------------------------------------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2002, 2003 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. +// +//--------------------------------------------------------------------------- + + +// File copied from sparse_matrix.2.templates.h and modified + +// Driver file for SparseMatrixEZ functions with two types. + +// TYPEMAT and TYPE2 are defined in sparsematrix?.cc + +//template SparseMatrixEZ & +//SparseMatrixEZ::copy_from (const SparseMatrixEZ &); + +//template +//void SparseMatrixEZ::copy_from (const FullMatrix &); + +//template void SparseMatrixEZ::add_scaled (const TYPEMAT, +// const SparseMatrixEZ &); + +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; + -- 2.39.5