Skip to content

Commit

Permalink
Merge pull request #660 from Pressio/fix_setting_maxiters_linsolver
Browse files Browse the repository at this point in the history
actually set max iters for lin solver
  • Loading branch information
fnrizzi authored Jan 23, 2024
2 parents ddb730e + 137785e commit 7434f11
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ class EigenIterative
static_assert( solver_traits::direct == false,
"The native eigen solver must be iterative to use in EigenIterative");


public:
iteration_type numIterationsExecuted() const
{
Expand All @@ -85,12 +86,14 @@ class EigenIterative

void resetLinearSystem(const MatrixType& A)
{
mysolver_.setMaxIterations(this->maxIters_);
mysolver_.compute(A);
}

template <typename T>
void solve(const T& b, T & y)
{
mysolver_.setMaxIterations(this->maxIters_);
y = mysolver_.solve(b);
}

Expand Down

0 comments on commit 7434f11

Please sign in to comment.