Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEV: Add the possibility to specifiy a minimum number of iterations for inner (linear) solvers in Newton's method #343

Closed
wants to merge 3 commits into from

Conversation

sblauth
Copy link
Owner

@sblauth sblauth commented Oct 26, 2023

This PR introduces the parameter min_inner_iter to the Newton's method, which can be used to specify the minimum amount of iterations a linear solver (inner solver) has to perform regardless of termination criteria.

Note, that this feature depends on PETSc >= 3.20 - so it only makes sense to merge this, once support for PETSc 3.20 exists (see #320)

Closes #290

@sblauth sblauth added enhancement New feature or request development labels Oct 26, 2023
@sblauth sblauth added this to the v2.1 milestone Oct 26, 2023
@sblauth sblauth self-assigned this Oct 26, 2023
cashocs/_utils/linalg.py Dismissed Show dismissed Hide dismissed
@codecov
Copy link

codecov bot commented Oct 26, 2023

Codecov Report

Merging #343 (c8fd024) into main (283fc40) will decrease coverage by 0.02%.
The diff coverage is 75.00%.

@@            Coverage Diff             @@
##             main     #343      +/-   ##
==========================================
- Coverage   92.50%   92.48%   -0.02%     
==========================================
  Files          84       84              
  Lines        6640     6648       +8     
==========================================
+ Hits         6142     6148       +6     
- Misses        498      500       +2     
Files Coverage Δ
cashocs/_pde_problems/state_problem.py 98.33% <100.00%> (+0.03%) ⬆️
cashocs/io/config.py 100.00% <ø> (ø)
cashocs/nonlinear_solvers/newton_solver.py 91.40% <100.00%> (+0.05%) ⬆️
cashocs/nonlinear_solvers/picard_solver.py 86.49% <ø> (ø)
cashocs/_utils/linalg.py 94.96% <66.67%> (-1.28%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@sblauth
Copy link
Owner Author

sblauth commented Feb 2, 2024

I'll close this, as users can simply use the PETSc option "ksp_min_it" for specifying this. See #290

@sblauth sblauth closed this Feb 2, 2024
@sblauth sblauth deleted the dev/inexact_newton_min_iter branch February 2, 2024 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Development] Should we add a minimum number of iterations for the inexact Newton's method
1 participant