Skip to content

Commit 3f4d491

Browse files
[tests] Add ivp::dopri5c to the tested implementations
1 parent 195ec08 commit 3f4d491

3 files changed

Lines changed: 12 additions & 5 deletions

File tree

tests/lang_c/test_ivp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ struct IvpImplementationsFixture : public testing::TestWithParam<const char *> {
278278
};
279279

280280
INSTANTIATE_TEST_SUITE_P(IvpImplementationsTests, IvpImplementationsFixture,
281-
testing::Values("sundials_cvode"
281+
testing::Values("sundials_cvode", "dopri5c"
282282
#if !defined(OIF_SANITIZE_ADDRESS_ENABLED)
283283
,
284284
"scipy_ode", "jl_diffeq"

tests/lang_julia/test_ivp.jl

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ function MildlyStiffODESystem()
121121
end
122122

123123

124-
POTENTIAL_IMPLEMENTATIONS = ["sundials_cvode", "jl_diffeq", "scipy_ode"]
124+
POTENTIAL_IMPLEMENTATIONS = ["sundials_cvode", "dopri5c", "jl_diffeq", "scipy_ode"]
125125
IMPLEMENTATIONS = []
126126
for impl in POTENTIAL_IMPLEMENTATIONS
127127
implh = load_impl("ivp", impl, 1, 0)
@@ -151,6 +151,9 @@ end
151151
if "scipy_ode" in IMPLEMENTATIONS
152152
INTEGRATORS["scipy_ode"] = ["vode", "lsoda", "dopri5", "dop853"]
153153
end
154+
if "dopri5c" in IMPLEMENTATIONS
155+
INTEGRATORS["dopri5c"] = []
156+
end
154157

155158
PROBLEMS = [ScalarExpDecayProblem(), LinearOscillatorProblem(), OrbitEquationsProblem()]
156159

@@ -176,8 +179,12 @@ PROBLEMS = [ScalarExpDecayProblem(), LinearOscillatorProblem(), OrbitEquationsPr
176179
function fixture_impl_integrators_prob(test_func)
177180
for impl in IMPLEMENTATIONS
178181
integrators = INTEGRATORS[impl]
179-
prob = OrbitEquationsProblem()
180-
test_func(impl, integrators, prob)
182+
if length(integrators) == 0
183+
println("Implementation $(impl) does not support setting integrators")
184+
else
185+
prob = OrbitEquationsProblem()
186+
test_func(impl, integrators, prob)
187+
end
181188
end
182189
end
183190

tests/lang_python/test_ivp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from openinterfaces.interfaces.ivp import IVP
88
from scipy import optimize
99

10-
POSSIBLE_IMPLEMENTATIONS = ["scipy_ode", "sundials_cvode", "jl_diffeq"]
10+
POSSIBLE_IMPLEMENTATIONS = ["scipy_ode", "dopri5c", "sundials_cvode", "jl_diffeq"]
1111
IMPLEMENTATION_LIST = []
1212

1313
for impl in POSSIBLE_IMPLEMENTATIONS:

0 commit comments

Comments
 (0)