From c07b9b05f10667c2a0ca185f6d468600536dde30 Mon Sep 17 00:00:00 2001 From: Bart de Koning Date: Wed, 1 May 2024 16:40:52 +0200 Subject: [PATCH] Fix sparse/AD tests --- core/test/run_models_test.jl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/core/test/run_models_test.jl b/core/test/run_models_test.jl index dfeed7313..3926f2a52 100644 --- a/core/test/run_models_test.jl +++ b/core/test/run_models_test.jl @@ -312,14 +312,15 @@ end @test successful_retcode(sparse_fdm) @test successful_retcode(dense_fdm) - @test dense_ad.integrator.sol.u[end] ≈ sparse_ad.integrator.sol.u[end] atol = 1e-3 - @test sparse_fdm.integrator.sol.u[end] ≈ sparse_ad.integrator.sol.u[end] - @test dense_fdm.integrator.sol.u[end] ≈ sparse_ad.integrator.sol.u[end] atol = 1e-3 + @test dense_ad.integrator.sol.u[end].storage ≈ sparse_ad.integrator.sol.u[end].storage + @test sparse_fdm.integrator.sol.u[end].storage ≈ sparse_ad.integrator.sol.u[end].storage + @test dense_fdm.integrator.sol.u[end].storage ≈ sparse_ad.integrator.sol.u[end].storage config = Ribasim.Config(toml_path; solver_algorithm = "Rodas5", solver_autodiff = true) time_ad = Ribasim.run(config) @test successful_retcode(time_ad) - @test time_ad.integrator.sol.u[end] ≈ sparse_ad.integrator.sol.u[end] atol = 1 + @test time_ad.integrator.sol.u[end].storage ≈ sparse_ad.integrator.sol.u[end].storage atol = + 1 end @testitem "TabulatedRatingCurve model" begin