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

Loading
Loading

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