From: janssen Date: Thu, 11 Mar 2010 19:27:29 +0000 (+0000) Subject: PreconditionIdentiy now provides the interface for use in a smoother for X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f7528e06910a58ae6fa80237b9f81bb2a151c54;p=dealii-svn.git 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 --- 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