Skip to content
Snippets Groups Projects

Const correctness in iterative solvers

Merged Nils-Arne Dreier requested to merge const_correctness_in_iterative_solvers into master

The constructors of IterativeSolvers took std::shared_ptr<LinearOperator<X,Y>> and std::shared_ptr<ScalarProduct<X>> as arguments, where the const version actually should suffice, since the corresponding methods are marked as const.

This MR changes the arguments to std::shared_ptr<const LinearOperator<X,Y>> and std::shared_ptr<const ScalarProduct<X>> and adapts the SolverFactory such that solvers can be created from a const operator.

This is a change of the interface but should not lead to problems due to the implicit conversion of std::shared_ptr<T> to std::shared_ptr<const T>.

Edited by Nils-Arne Dreier

Merge request reports

Pipeline #43608 passed

Pipeline passed for 1c8084b7 on const_correctness_in_iterative_solvers

Merged by Christian EngwerChristian Engwer 2 years ago (Mar 9, 2022 10:11am UTC)

Loading

Pipeline #43900 passed

Pipeline passed for 90236d45 on master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading