From: kanschat Date: Mon, 23 May 2011 03:06:21 +0000 (+0000) Subject: make MGLevelObject a base class of mg::SmootherRelaxation X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=92860cd2e9ed861f19221a721845f84504bc78e8;p=dealii-svn.git make MGLevelObject a base class of mg::SmootherRelaxation git-svn-id: https://svn.dealii.org/trunk@23736 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/multigrid/mg_smoother.h b/deal.II/include/deal.II/multigrid/mg_smoother.h index 623e6594c0..98e4317fa7 100644 --- a/deal.II/include/deal.II/multigrid/mg_smoother.h +++ b/deal.II/include/deal.II/multigrid/mg_smoother.h @@ -230,7 +230,7 @@ namespace mg * @date 2003, 2009, 2010 */ template -class SmootherRelaxation : public MGSmoother +class SmootherRelaxation : public MGLevelObject, public MGSmoother { public: /** @@ -280,11 +280,6 @@ class SmootherRelaxation : public MGSmoother // void initialize (const MGLevelObject >& matrices, // const typename RELAX::AdditionalData & additional_data = typename RELAX::AdditionalData()); - /** - * Empty all vectors. - */ - void clear (); - /** * The actual smoothing method. */ @@ -296,13 +291,6 @@ class SmootherRelaxation : public MGSmoother * Memory used by this object. */ std::size_t memory_consumption () const; - - private: - /** - * Object containing relaxation - * methods. - */ - MGLevelObject smoothers; }; } @@ -761,14 +749,6 @@ namespace mg {} - template - inline void - SmootherRelaxation::clear () - { - smoothers.clear(); - } - - template template inline void @@ -779,10 +759,10 @@ namespace mg const unsigned int min = m.get_minlevel(); const unsigned int max = m.get_maxlevel(); - smoothers.resize(min, max); + this->resize(min, max); for (unsigned int i=min;i<=max;++i) - smoothers[i].initialize(m[i], data); + (*this)[i].initialize(m[i], data); } @@ -801,10 +781,10 @@ namespace mg Assert (data.get_maxlevel() == max, ExcDimensionMismatch(data.get_maxlevel(), max)); - smoothers.resize(min, max); + this->resize(min, max); for (unsigned int i=min;i<=max;++i) - smoothers[i].initialize(m[i], data[i]); + (*this)[i].initialize(m[i], data[i]); } @@ -815,7 +795,7 @@ namespace mg VECTOR& u, const VECTOR& rhs) const { - unsigned int maxlevel = smoothers.get_maxlevel(); + unsigned int maxlevel = this->get_maxlevel(); unsigned int steps2 = this->steps; if (this->variable) @@ -830,9 +810,9 @@ namespace mg for (unsigned int i=0; isymmetric) T = !T; } @@ -846,7 +826,8 @@ namespace mg memory_consumption () const { return sizeof(*this) - + smoothers.memory_consumption() + -sizeof(MGLevelObject) + + MGLevelObject::memory_consumption() + this->mem->memory_consumption(); } }