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

added global check for multimodel #61

Merged
merged 2 commits into from
May 28, 2024
Merged

Conversation

xavierr
Copy link
Contributor

@xavierr xavierr commented Mar 18, 2024

Added possibility for making a converge check at the level of the main model (in the case of a multimodel)

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 66.66667% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 43.89%. Comparing base (7b84168) to head (b406585).

Files Patch % Lines
src/multimodel/model.jl 66.66% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #61   +/-   ##
=======================================
  Coverage   43.89%   43.89%           
=======================================
  Files         129      129           
  Lines       14023    14026    +3     
=======================================
+ Hits         6155     6157    +2     
- Misses       7868     7869    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -858,6 +858,13 @@ function check_convergence(storage, model::MultiModel, cfg; tol = nothing, extra
err = max(e, err)
offset += number_of_degrees_of_freedom(m) ÷ model_block_size(m)
end

if converged
if haskey(tol_cfg, :global_check) && !isnothing(tol_cfg[:global_check])
Copy link
Member

Choose a reason for hiding this comment

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

Maybe it could be called global_convergence_function? We could also pass on the kwarg that contain the time and so on since that is useful for some convergence checks.

@moyner moyner merged commit 0814cd5 into main May 28, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants