From 1827f87894db04f243fad4a31b4e57b60f30761f Mon Sep 17 00:00:00 2001 From: Bart de Koning Date: Mon, 6 May 2024 18:22:19 +0200 Subject: [PATCH] Use atmp from nlsolver cache --- core/src/main.jl | 5 +++-- core/test/validation_test.jl | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/core/src/main.jl b/core/src/main.jl index 93c8c7db1..1d69172d7 100644 --- a/core/src/main.jl +++ b/core/src/main.jl @@ -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):", diff --git a/core/test/validation_test.jl b/core/test/validation_test.jl index a15c3f037..1edc7ffac 100644 --- a/core/test/validation_test.jl +++ b/core/test/validation_test.jl @@ -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