Skip to content

Commit

Permalink
Add vector copy to ilu preconditioner, ensuring linearity of the prec…
Browse files Browse the repository at this point in the history
…onditioner when iterative solvers are used for the triangular systems.
  • Loading branch information
fritzgoebel committed Apr 24, 2020
1 parent be2eb46 commit cdbbab4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/ginkgo/core/preconditioner/ilu.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,11 @@ class Ilu : public EnableLinOp<
set_cache_to(b);
if (!ReverseApply) {
l_solver_->apply(b, cache_.intermediate.get());
x->copy_from(cache_.intermediate.get());
u_solver_->apply(cache_.intermediate.get(), x);
} else {
u_solver_->apply(b, cache_.intermediate.get());
x->copy_from(cache_.intermediate.get());
l_solver_->apply(cache_.intermediate.get(), x);
}
}
Expand Down

0 comments on commit cdbbab4

Please sign in to comment.