Commit 65aaecf2 authored by oliver.sander_at_tu-dresden.de's avatar oliver.sander_at_tu-dresden.de
Browse files

Take iteration step as a shared_ptr instead of a reference

parent 2bc61124
......@@ -46,7 +46,7 @@ public:
TNNMGStep(const Functional& f,
Vector& x,
std::shared_ptr<IterationStep<Vector,BitVector> > nonlinearSmoother,
const LinearSolver& linearSolver,
std::shared_ptr<LinearSolver> linearSolver,
const DefectProjection& projection,
const LineSearchSolver& lineSolver)
: Base(x),
......@@ -104,10 +104,10 @@ public:
auto emptyIgnore = ignore;
Solvers::resizeInitialize(emptyIgnore, constrainedCorrection_, false);
linearSolver_.step_->setIgnore(emptyIgnore);
linearSolver_.step_->setProblem(A, constrainedCorrection_, r);
linearSolver_.preprocess();
linearSolver_.solve();
linearSolver_->step_->setIgnore(emptyIgnore);
linearSolver_->step_->setProblem(A, constrainedCorrection_, r);
linearSolver_->preprocess();
linearSolver_->solve();
linearization_->extendCorrection(constrainedCorrection_, correction_);
......@@ -149,7 +149,7 @@ private:
std::size_t preSmoothingSteps_;
std::shared_ptr<Linearization> linearization_;
LinearSolver linearSolver_;
std::shared_ptr<LinearSolver> linearSolver_;
typename Linearization::ConstrainedVector constrainedCorrection_;
Vector correction_;
DefectProjection projection_;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment