From 8328f18f865fd77a51b42b5dbfb3e4f112efa752 Mon Sep 17 00:00:00 2001 From: Shahriar Iravanian Date: Sun, 18 Apr 2021 17:09:04 -0400 Subject: [PATCH] noble added to tests --- test/noble_1962.jl | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 test/noble_1962.jl diff --git a/test/noble_1962.jl b/test/noble_1962.jl new file mode 100644 index 0000000..5fdd818 --- /dev/null +++ b/test/noble_1962.jl @@ -0,0 +1,10 @@ +path = @__DIR__ +ml = CellModel(path * "/../models/noble_1962/Noble_1962.cellml") + +prob = ODEProblem(ml, (0,10000.0)) +sol1 = solve(prob, Euler(), dt=0.01, saveat=1.0) +sol2 = solve(prob, TRBDF2(), dtmax=0.5, saveat=1.0) +V1 = map(x -> x[2], sol1.u) +V2 = map(x -> x[2], sol2.u) +err = sum(abs.(V1 .- V2)) / length(V1) +@test err < 1.0