From: guido Date: Mon, 31 Mar 2003 09:58:48 +0000 (+0000) Subject: pseudo-adding Tvmult introduced X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ba4bb05a81645861dd9409f6d2f50a291f37533;p=dealii-svn.git pseudo-adding Tvmult introduced git-svn-id: https://svn.dealii.org/trunk@7340 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/include/lac/precondition_block.h b/deal.II/lac/include/lac/precondition_block.h index 6b93e66f32..d6c7b51e81 100644 --- a/deal.II/lac/include/lac/precondition_block.h +++ b/deal.II/lac/include/lac/precondition_block.h @@ -542,6 +542,26 @@ class PreconditionBlockSOR : public virtual Subscriptor, template void Tvmult (Vector&, const Vector&) const; + /** + * Execute backward block SOR + * preconditioning. + * + * Warning: this function + * performs normal @p{vmult} + * without adding. The reason for + * its existence is that + * @ref{BlockMatrixArray} + * requires the adding version by + * default. On the other hand, + * adding requires an additional + * auxiliary vector, which is not + * desirable. + * + * @see{vmult}. + */ + template + void Tvmult_add (Vector&, const Vector&) const; + private: /** * Actual implementation of the @@ -555,6 +575,18 @@ class PreconditionBlockSOR : public virtual Subscriptor, const Vector&, const bool adding) const; + /** + * Actual implementation of the + * preconditioning algorithm. + * + * The parameter @p{adding} does + * not have any function, yet. + */ + template + void do_Tvmult (Vector&, + const Vector&, + const bool adding) const; + }; diff --git a/deal.II/lac/include/lac/precondition_block.templates.h b/deal.II/lac/include/lac/precondition_block.templates.h index daa3e0ba55..4a5a2fbff5 100644 --- a/deal.II/lac/include/lac/precondition_block.templates.h +++ b/deal.II/lac/include/lac/precondition_block.templates.h @@ -497,8 +497,10 @@ void PreconditionBlockSOR::do_vmult ( template template -void PreconditionBlockSOR::Tvmult (Vector &dst, - const Vector &src) const +void PreconditionBlockSOR::do_Tvmult ( + Vector &dst, + const Vector &src, + const bool) const { // introduce the following typedef // since in the use of exceptions, @@ -628,6 +630,26 @@ void PreconditionBlockSOR } +template +template +void PreconditionBlockSOR +::Tvmult (Vector &dst, + const Vector &src) const +{ + do_Tvmult(dst, src, false); +} + + +template +template +void PreconditionBlockSOR +::Tvmult_add (Vector &dst, + const Vector &src) const +{ + do_Tvmult(dst, src, true); +} + + //----------------------------------------------------------------------//