From 55555407f9244ef8e8aa840a0a99ef1464d66f74 Mon Sep 17 00:00:00 2001 From: Oliver Sander <sander@igpm.rwth-aachen.de> Date: Tue, 16 Jun 2009 10:20:04 +0000 Subject: [PATCH] Explicitly state that LoopSolver is the one from the dune-solvers module [[Imported from SVN: r2502]] --- dune-solvers/iterationsteps/multigridstep.cc | 9 +++++---- dune-solvers/solvers/loopsolver.cc | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/dune-solvers/iterationsteps/multigridstep.cc b/dune-solvers/iterationsteps/multigridstep.cc index c09f7a46..9faddf9b 100644 --- a/dune-solvers/iterationsteps/multigridstep.cc +++ b/dune-solvers/iterationsteps/multigridstep.cc @@ -65,8 +65,7 @@ void MultigridStep<OperatorType, VectorType, BitVectorType>::preprocess() delete(this->mat_[i]); this->mat_[i] = NULL; } -// int nDofs = this->mgTransfer_[i]->getMatrix().M(); -// this->mat_[i] = new OperatorType(nDofs, nDofs, OperatorType::row_wise); + this->mat_[i] = new OperatorType; // Compute which entries are present in the (sparse) coarse grid stiffness @@ -110,9 +109,11 @@ void MultigridStep<OperatorType, VectorType, BitVectorType>::preprocess() if (this->basesolver_ == NULL) DUNE_THROW(SolverError, "You have not provided a base solver!"); - if (typeid(*this->basesolver_) == typeid(LoopSolver<VectorType>)) { + typedef ::LoopSolver<VectorType> DuneSolversLoopSolver; + + if (typeid(*this->basesolver_) == typeid(DuneSolversLoopSolver)) { - LoopSolver<VectorType>* loopBaseSolver = dynamic_cast<LoopSolver<VectorType>* > (this->basesolver_); + DuneSolversLoopSolver* loopBaseSolver = dynamic_cast<DuneSolversLoopSolver*> (this->basesolver_); typedef LinearIterationStep<OperatorType, VectorType> SmootherType; assert(dynamic_cast<SmootherType*>(loopBaseSolver->iterationStep_)); diff --git a/dune-solvers/solvers/loopsolver.cc b/dune-solvers/solvers/loopsolver.cc index 2e027f4c..72c4f303 100644 --- a/dune-solvers/solvers/loopsolver.cc +++ b/dune-solvers/solvers/loopsolver.cc @@ -4,7 +4,7 @@ #include <iomanip> template <class VectorType, class BitVectorType> -void LoopSolver<VectorType, BitVectorType>::check() const +void ::LoopSolver<VectorType, BitVectorType>::check() const { if (!iterationStep_) DUNE_THROW(SolverError, "You need to supply an iteration step to an iterative solver!"); @@ -16,7 +16,7 @@ void LoopSolver<VectorType, BitVectorType>::check() const } template <class VectorType, class BitVectorType> -void LoopSolver<VectorType, BitVectorType>::solve() +void ::LoopSolver<VectorType, BitVectorType>::solve() { int i; -- GitLab