From 4f7528e06910a58ae6fa80237b9f81bb2a151c54 Mon Sep 17 00:00:00 2001 From: janssen Date: Thu, 11 Mar 2010 19:27:29 +0000 Subject: [PATCH] PreconditionIdentiy now provides the interface for use in a smoother for MG git-svn-id: https://svn.dealii.org/trunk@20800 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/include/lac/precondition.h | 44 ++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/deal.II/lac/include/lac/precondition.h b/deal.II/lac/include/lac/precondition.h index 57582ecf81..e61b60a28c 100644 --- a/deal.II/lac/include/lac/precondition.h +++ b/deal.II/lac/include/lac/precondition.h @@ -55,6 +55,33 @@ template class SparseMatrix; class PreconditionIdentity : public Subscriptor { public: + + /** + * This function is only + * present to + * provide the interface of + * a precondtioner to be + * handed to a smoother. + * This does nothing. + */ + struct AdditionalData + { + /** + * Constructor. + */ + AdditionalData (){} + }; + + /** + * The matrix + * argument is ignored and here + * just for compatibility with + * more complex preconditioners. + */ + template + void initialize (const MATRIX &matrix, + const AdditionalData &additional_data = AdditionalData()); + /** * Apply preconditioner. */ @@ -86,6 +113,16 @@ class PreconditionIdentity : public Subscriptor */ template void Tvmult_add (VECTOR&, const VECTOR&) const; + + /** + * This function is only + * present to + * provide the interface of + * a precondtioner to be + * handed to a smoother. + * This does nothing. + */ + void clear (){} }; @@ -1028,6 +1065,13 @@ class PreconditionChebyshev : public Subscriptor #ifndef DOXYGEN +template +inline void +PreconditionIdentity::initialize ( + const MATRIX&, + const PreconditionIdentity::AdditionalData&) +{} + template inline void -- 2.39.5