Skip to content

Commit

Permalink
Use atmp from nlsolver cache
Browse files Browse the repository at this point in the history
  • Loading branch information
SouthEndMusic committed May 6, 2024
1 parent 97c0390 commit 1827f87
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions core/src/main.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ function main(toml_path::AbstractString)::Cint
(; cache, p, u) = model.integrator
(; basin) = p
# Indicate convergence bottlenecks if possible with the current algorithm
if hasproperty(cache, :atmp)
storage_error = @. abs(cache.atmp.storage / u.storage)
if hasproperty(cache, :nlsolver)
storage_error = @. abs(cache.nlsolver.cache.atmp.storage / u.storage)
@show storage_error
perm = sortperm(storage_error; rev = true)
println(
"The following basins were identified as convergence bottlenecks (in descending order of severity):",
Expand Down
6 changes: 3 additions & 3 deletions core/test/validation_test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ end
output[1],
"The following basins were identified as convergence bottlenecks",
)
@test startswith(output[2], "Basin #1")
@test startswith(output[3], "Basin #21")
@test startswith(output[4], "Basin #41")
@test startswith(output[2], "Basin #11")
@test startswith(output[3], "Basin #31")
@test startswith(output[4], "Basin #51")
end

0 comments on commit 1827f87

Please sign in to comment.