Skip to content

Commit

Permalink
Added test for Toda lattic ensemble problem.
Browse files Browse the repository at this point in the history
  • Loading branch information
benedict-96 committed Jun 28, 2024
1 parent 6835c70 commit 54f742f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/test_hodeensembles.jl
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
using GeometricIntegrators: ImplicitMidpoint, integrate
import GeometricProblems.CoupledHarmonicOscillator as cho
import GeometricProblems.TodaLattice as tl
using Test

function test_multiple_initial_conditions(cho::Module)
q₀_vec = [cho.q₀ .+ α for α in 0.:.1:1.]
p₀_vec = [cho.p₀ .+ α for α in 0.:.1:1.]
q₀_vec = [cho.q₀ .+ α for α in 0. : .4 : .8]
p₀_vec = [cho.p₀ .+ α for α in 0. : .4 : .8]

# ensemble problem
epr = cho.hodeensemble(q₀_vec, p₀_vec)
Expand Down Expand Up @@ -38,5 +39,7 @@ function test_multiple_parameters(cho::Module)
end

test_multiple_initial_conditions(cho)
test_multiple_initial_conditions(tl)

test_multiple_parameters(cho)
test_multiple_parameters(cho)
test_multiple_parameters(tl)

0 comments on commit 54f742f

Please sign in to comment.