Skip to content
Snippets Groups Projects
Commit 36fa3779 authored by oliver.sander_at_tu-dresden.de's avatar oliver.sander_at_tu-dresden.de
Browse files

getIterationStep returns a shared_ptr now

parent 210ce85f
No related branches found
No related tags found
1 merge request!23WIP: Make getiterationstep return shared ptr
Pipeline #29731 passed
...@@ -66,8 +66,8 @@ preprocess() ...@@ -66,8 +66,8 @@ preprocess()
typedef ProjectedBlockGSStep<MatrixType, VectorType> SmootherType; typedef ProjectedBlockGSStep<MatrixType, VectorType> SmootherType;
dynamic_cast<SmootherType*>(&loopBaseSolver->getIterationStep())->hasObstacle_ = hasObstacleHierarchy_[0].get(); std::dynamic_pointer_cast<SmootherType>(loopBaseSolver->getIterationStep())->hasObstacle_ = hasObstacleHierarchy_[0].get();
dynamic_cast<SmootherType*>(&loopBaseSolver->getIterationStep())->obstacles_ = obstacleHierarchy_[0].get(); std::dynamic_pointer_cast<SmootherType>(loopBaseSolver->getIterationStep())->obstacles_ = obstacleHierarchy_[0].get();
#if HAVE_IPOPT #if HAVE_IPOPT
} else if (typeid(*this->basesolver_) == typeid(QuadraticIPOptSolver<MatrixType,VectorType>)) { } else if (typeid(*this->basesolver_) == typeid(QuadraticIPOptSolver<MatrixType,VectorType>)) {
......
...@@ -162,7 +162,7 @@ void MultigridStep<MatrixType, VectorType, BitVectorType>::preprocess() ...@@ -162,7 +162,7 @@ void MultigridStep<MatrixType, VectorType, BitVectorType>::preprocess()
typedef ::LoopSolver<VectorType> DuneSolversLoopSolver; typedef ::LoopSolver<VectorType> DuneSolversLoopSolver;
if (auto loopBaseSolver = std::dynamic_pointer_cast<DuneSolversLoopSolver>(this->basesolver_)) { if (auto loopBaseSolver = std::dynamic_pointer_cast<DuneSolversLoopSolver>(this->basesolver_)) {
auto iterationStep = dynamic_cast<SmootherType*>(&loopBaseSolver->getIterationStep()); auto iterationStep = std::dynamic_pointer_cast<SmootherType>(loopBaseSolver->getIterationStep());
assert(iterationStep); assert(iterationStep);
iterationStep->setProblem(*(this->matrixHierarchy_[0]), *this->xHierarchy_[0], this->rhsHierarchy_[0]); iterationStep->setProblem(*(this->matrixHierarchy_[0]), *this->xHierarchy_[0], this->rhsHierarchy_[0]);
iterationStep->setIgnore(*ignoreNodesHierarchy_[0]); iterationStep->setIgnore(*ignoreNodesHierarchy_[0]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment