...
  View open merge request
Commits (2)
......@@ -66,8 +66,8 @@ preprocess()
typedef ProjectedBlockGSStep<MatrixType, VectorType> SmootherType;
dynamic_cast<SmootherType*>(&loopBaseSolver->getIterationStep())->hasObstacle_ = hasObstacleHierarchy_[0].get();
dynamic_cast<SmootherType*>(&loopBaseSolver->getIterationStep())->obstacles_ = obstacleHierarchy_[0].get();
std::dynamic_pointer_cast<SmootherType>(loopBaseSolver->getIterationStep())->hasObstacle_ = hasObstacleHierarchy_[0].get();
std::dynamic_pointer_cast<SmootherType>(loopBaseSolver->getIterationStep())->obstacles_ = obstacleHierarchy_[0].get();
#if HAVE_IPOPT
} else if (typeid(*this->basesolver_) == typeid(QuadraticIPOptSolver<MatrixType,VectorType>)) {
......
......@@ -154,10 +154,10 @@ void MultigridStep<MatrixType, VectorType, BitVectorType>::preprocess()
DuneSolversLoopSolver* loopBaseSolver = dynamic_cast<DuneSolversLoopSolver*> (this->basesolver_.get());
assert(dynamic_cast<SmootherType*>(&loopBaseSolver->getIterationStep()));
assert(std::dynamic_pointer_cast<SmootherType>(loopBaseSolver->getIterationStep()));
dynamic_cast<SmootherType*>(&loopBaseSolver->getIterationStep())->setProblem(*(this->matrixHierarchy_[0]), *this->xHierarchy_[0], this->rhsHierarchy_[0]);
dynamic_cast<SmootherType*>(&loopBaseSolver->getIterationStep())->setIgnore(*ignoreNodesHierarchy_[0]);
std::dynamic_pointer_cast<SmootherType>(loopBaseSolver->getIterationStep())->setProblem(*(this->matrixHierarchy_[0]), *this->xHierarchy_[0], this->rhsHierarchy_[0]);
std::dynamic_pointer_cast<SmootherType>(loopBaseSolver->getIterationStep())->setIgnore(*ignoreNodesHierarchy_[0]);
}
else if (dynamic_cast<LinearSolverType*>(this->basesolver_.get())) {
......
......@@ -88,15 +88,15 @@ namespace Dune {
}
/** \brief Get iteration step */
const ItStep& getIterationStep() const
const std::shared_ptr<ItStep> getIterationStep() const
{
return *iterationStep_;
return iterationStep_;
}
/** \brief Get iteration step */
ItStep& getIterationStep()
std::shared_ptr<ItStep> getIterationStep()
{
return *iterationStep_;
return iterationStep_;
}
/** \brief Set the error norm */
......