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

Add convergence to the monitor #1625

Merged
merged 15 commits into from
Dec 9, 2024

Conversation

timfelle
Copy link
Collaborator

@timfelle timfelle commented Dec 3, 2024

Adds a convergence flag to the krylov monitor.
Additionally use the flag for throwing an error instead of the nan check.

@timfelle timfelle added the enhancement New feature or request label Dec 3, 2024
Copy link
Collaborator

@njansson njansson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think all the checks should be safe false when either is NaN, so it should work. But would be good to get a second opinion on that @pohm01?

Also, before we merge the sx solvers needed to be modified as well

src/fluid/fluid_aux.f90 Outdated Show resolved Hide resolved
@timfelle
Copy link
Collaborator Author

timfelle commented Dec 5, 2024

I think all the checks should be safe false when either is NaN, so it should work. But would be good to get a second opinion on that @pohm01?

I added it as a new check instead. So now the solver reports "divergence" under NaN check as before and reports "non-convergence" for the new check.

Also, before we merge the sx solvers needed to be modified as well

Done.

@timfelle timfelle enabled auto-merge December 5, 2024 10:50
Copy link
Collaborator

@MartinKarp MartinKarp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Mostly an idea regarding the check to make future changes easier.

src/krylov/bcknd/cpu/cg.f90 Outdated Show resolved Hide resolved
@timfelle timfelle merged commit 2bc1391 into ExtremeFLOW:develop Dec 9, 2024
27 checks passed
@timfelle timfelle deleted the feature/stop_criterion branch December 9, 2024 11:46
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.

4 participants