diff --git a/dune/solvers/iterationsteps/multigridstep.cc b/dune/solvers/iterationsteps/multigridstep.cc index 717d5761dbc3f19df2257918beece311259e4a47..1bd539d76b0fe05288adc11318932bdd8b70b850 100644 --- a/dune/solvers/iterationsteps/multigridstep.cc +++ b/dune/solvers/iterationsteps/multigridstep.cc @@ -49,7 +49,7 @@ setMGType(int mu, int nu1, int nu2) * \li transfer operators * \li fine level matrix, solution vector and right hand side * \li smoothers - * have to be set prior to the call to preprocess(). + * have to be set prior to the call to preprocess(). * If any is changed subsequently, preprocess() has to be called again before iterate(). * There is one exception. The right hand side may be changed by setRhs() without a subsequent call to preprocess(). * This is in order to be able to compute solutions to multiple rhs w/o having to reassemble the same matrix hierarchy time and again. @@ -121,7 +121,7 @@ void MultigridStep<MatrixType, VectorType, BitVectorType>::preprocess() this->xHierarchy_[i] = std::shared_ptr<VectorType>(new VectorType); // Compute which entries are present in the (sparse) coarse grid stiffness - // matrices. + // matrices. this->mgTransfer_[i]->galerkinRestrictSetOccupation(*this->matrixHierarchy_[i+1], *std::const_pointer_cast<MatrixType>(this->matrixHierarchy_[i])); // setup matrix @@ -161,21 +161,21 @@ void MultigridStep<MatrixType, VectorType, BitVectorType>::preprocess() if (typeid(*this->basesolver_) == typeid(DuneSolversLoopSolver)) { DuneSolversLoopSolver* loopBaseSolver = dynamic_cast<DuneSolversLoopSolver*> (this->basesolver_); - + typedef LinearIterationStep<MatrixType, VectorType> SmootherType; assert(dynamic_cast<SmootherType*>(loopBaseSolver->iterationStep_)); dynamic_cast<SmootherType*>(loopBaseSolver->iterationStep_)->setProblem(*(this->matrixHierarchy_[0]), *this->xHierarchy_[0], this->rhsHierarchy_[0]); dynamic_cast<SmootherType*>(loopBaseSolver->iterationStep_)->ignoreNodes_ = ignoreNodesHierarchy_[0]; - + } #if HAVE_IPOPT else if (typeid(*this->basesolver_) == typeid(QuadraticIPOptSolver<MatrixType,VectorType>)) { QuadraticIPOptSolver<MatrixType,VectorType>* ipoptBaseSolver = dynamic_cast<QuadraticIPOptSolver<MatrixType,VectorType>*> (this->basesolver_); - + ipoptBaseSolver->setProblem(*(this->matrixHierarchy_[0]), *this->xHierarchy_[0], this->rhsHierarchy_[0]); - } + } #endif else { DUNE_THROW(SolverError, "You can't use " << typeid(*this->basesolver_).name()