From ca4c994c5c41c98cbebb0542e6f88c8ecbf66f4d Mon Sep 17 00:00:00 2001 From: Oliver Sander <sander@igpm.rwth-aachen.de> Date: Sun, 11 Nov 2012 12:35:37 +0000 Subject: [PATCH] Add method numLevels() which returns, well, the number of levels Note: it does _not_ return the content of the numLevels_ variable, but rather the number of transfer operators plus one. [[Imported from SVN: r7397]] --- dune/solvers/iterationsteps/multigridstep.hh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dune/solvers/iterationsteps/multigridstep.hh b/dune/solvers/iterationsteps/multigridstep.hh index baa7c1a3..f3c7fdb6 100644 --- a/dune/solvers/iterationsteps/multigridstep.hh +++ b/dune/solvers/iterationsteps/multigridstep.hh @@ -187,6 +187,12 @@ // virtual VectorType getSol(); // virtual const MatrixType* getMatrix(); + + /** \brief Return total number of levels of the multigrid hierarchy */ + virtual size_t numLevels() const + { + return mgTransfer_.size() + 1; + } virtual int level() const {return level_;} -- GitLab