Skip to content

Commit

Permalink
added global check for multimodel (#61)
Browse files Browse the repository at this point in the history
* added global check for multimodel

* changed key name
  • Loading branch information
xavierr authored May 28, 2024
1 parent 47ed79c commit 0814cd5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/multimodel/model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,13 @@ function check_convergence(storage, model::MultiModel, cfg;
converged = converged && conv
err = max(e, err)
end

if converged
if haskey(tol_cfg, :global_convergence_check_function) && !isnothing(tol_cfg[:global_convergence_check_function])
converged = tol_cfg[:global_convergence_check_function](model, storage)
end
end

if extra_out
return (converged, err, errors)
else
Expand Down

0 comments on commit 0814cd5

Please sign in to comment.