diff --git a/dune/solvers/iterationsteps/multigridstep.hh b/dune/solvers/iterationsteps/multigridstep.hh index f3c7fdb667f9378f68f636e63aba29b5c1a9d245..6605cf1d3e46433ce6c06da9d77db15a2c07f54b 100644 --- a/dune/solvers/iterationsteps/multigridstep.hh +++ b/dune/solvers/iterationsteps/multigridstep.hh @@ -39,7 +39,7 @@ LinearIterationStep<MatrixType, VectorType>* postSmoother, Solver* baseSolver, const BitVectorType* ignoreNodes) - DUNE_DEPRECATED_MSG("The number of levels is no longer set explicitely, but instead inferred from the number of transfer operators.\n Just erase the number of levels from the argument list in your constructor call.") : + DUNE_DEPRECATED_MSG("The number of levels is no longer set explicitely, but instead inferred from the number of transfer operators. Just erase the number of levels from the argument list in your constructor call.") : LinearIterationStep<MatrixType, VectorType>(mat, x, rhs), presmoother_(numLevels), postsmoother_(numLevels), matrixHierarchy_(numLevels), @@ -88,7 +88,7 @@ MultigridStep(const MatrixType& mat, VectorType& x, VectorType& rhs, int numLevels) - DUNE_DEPRECATED_MSG("The number of levels is no longer set explicitely, but instead inferred from the number of transfer operators.\n Just erase the number of levels from the argument list in your constructor call.") : + DUNE_DEPRECATED_MSG("The number of levels is no longer set explicitely, but instead inferred from the number of transfer operators. Just erase the number of levels from the argument list in your constructor call.") : LinearIterationStep<MatrixType, VectorType>(mat, x, rhs), presmoother_(numLevels),postsmoother_(numLevels), basesolver_(0), @@ -112,43 +112,25 @@ virtual ~MultigridStep() { - for (size_t i=0; i<matrixHierarchy_.size()-1; i++) - delete(ignoreNodesHierarchy_[i]); + for (int i=0; i<int(ignoreNodesHierarchy_.size()-1); i++) + { + if (ignoreNodesHierarchy_[i]) + delete(ignoreNodesHierarchy_[i]); + } } virtual void setProblem(const MatrixType& mat, VectorType& x, VectorType& rhs, int numLevels) - DUNE_DEPRECATED_MSG("Use setProblem(const MatrixType& mat,VectorType& x,const VectorType& rhs).\n The number of levels is no longer set explicitely, but instead inferred from the number of transfer operators.") + DUNE_DEPRECATED_MSG("Use setProblem(const MatrixType& mat,VectorType& x,const VectorType& rhs). The number of levels is no longer set explicitely, but instead inferred from the number of transfer operators.") { setProblem(mat, x, rhs); } virtual void setNumberOfLevels(int numLevels) - DUNE_DEPRECATED_MSG("The number of levels is no longer set explicitely, but instead inferred from the number of transfer operators.\n The functionality of this function is now performed in preprocess().") - { - numLevels_ = numLevels; - - for (int i=0; i<int(ignoreNodesHierarchy_.size())-1; i++) - if (ignoreNodesHierarchy_[i]) - delete(ignoreNodesHierarchy_[i]); - - matrixHierarchy_.resize(numLevels); - ignoreNodesHierarchy_.resize(numLevels); - - for (int i=0; i<int(matrixHierarchy_.size())-1; i++) - { - matrixHierarchy_[i].reset(); - ignoreNodesHierarchy_[i] = NULL; - } - - presmoother_.resize(numLevels); - postsmoother_.resize(numLevels); - - xHierarchy_.resize(numLevels); - rhsHierarchy_.resize(numLevels); - } + DUNE_DEPRECATED_MSG("The number of levels is no longer set explicitely, but instead inferred from the number of transfer operators. The functionality of this function is now performed in preprocess().") + {} virtual void setProblem(const MatrixType& mat, VectorType& x,