Skip to content

Commit

Permalink
Remove Quadmath
Browse files Browse the repository at this point in the history
  • Loading branch information
Theozeud committed Apr 15, 2024
1 parent f775eec commit 2274619
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions test/algconvergence/ode_quadruple_precision_tests.jl
Original file line number Diff line number Diff line change
@@ -1,41 +1,40 @@
using OrdinaryDiffEq, DiffEqDevTools, Test, Random
import ODEProblemLibrary: prob_ode_linear, prob_ode_2Dlinear, prob_ode_bigfloat2Dlinear
using Quadmath

Random.seed!(100)

dts = Float128.(1 .// 2 .^ (6:-1:2))
dts = BigFloat.(1 .// 2 .^ (6:-1:2))
testTol = 0.35

# Tests on simple problem

f = (u, p, t) -> cos(t)
prob_ode_sin = ODEProblem(
ODEFunction(f; analytic = (u0, p, t) -> sin(t)),
Float128(0.0),
(Float128(0.0), Float128(1.0)))
BigFloat(0.0),
(BigFloat(0.0), BigFloat(1.0)))

f = (du, u, p, t) -> du[1] = cos(t)
prob_ode_sin_inplace = ODEProblem(
ODEFunction(f; analytic = (u0, p, t) -> [sin(t)]),
[Float128(0.0)],
(Float128(0.0), Float128(1.0)))
[BigFloat(0.0)],
(BigFloat(0.0), BigFloat(1.0)))

f = (u, p, t) -> sin(u)
prob_ode_nonlinear = ODEProblem(
ODEFunction(
f; analytic = (u0, p, t) -> Float128(2.0) * acot(exp(-t)
* cot(Float128(0.5)))),
Float128(1.0),
(Float128(0.0), Float128(0.5)))
f; analytic = (u0, p, t) -> BigFloat(2.0) * acot(exp(-t)
* cot(BigFloat(0.5)))),
BigFloat(1.0),
(BigFloat(0.0), BigFloat(0.5)))

f = (du, u, p, t) -> du[1] = sin(u[1])
prob_ode_nonlinear_inplace = ODEProblem(
ODEFunction(
f; analytic = (u0, p, t) -> [Float128(2.0) * acot(exp(-t)
* cot(Float128(0.5)))]),
[Float128(1.0)],
(Float128(0.0), Float128(0.5)))
f; analytic = (u0, p, t) -> [BigFloat(2.0) * acot(exp(-t)
* cot(BigFloat(0.5)))]),
[BigFloat(1.0)],
(BigFloat(0.0), BigFloat(0.5)))

test_problems_only_time = [prob_ode_sin, prob_ode_sin_inplace]
test_problems_linear = [prob_ode_bigfloat2Dlinear]
Expand Down

0 comments on commit 2274619

Please sign in to comment.