-
-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #762 from JuliaDiffEq/tests
Restructure tests
- Loading branch information
Showing
68 changed files
with
1,192 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,5 @@ DiffEqCallbacks | |
DiffEqOperators | ||
SafeTestsets | ||
Calculus | ||
Unitful | ||
DiffEqSensitivity |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
using OrdinaryDiffEq, DiffEqBase, Test, DiffEqProblemLibrary, DiffEqDevTools, | ||
Random | ||
|
||
using DiffEqProblemLibrary.ODEProblemLibrary: importodeproblems; importodeproblems() | ||
import DiffEqProblemLibrary.ODEProblemLibrary: prob_ode_bigfloatlinear, | ||
prob_ode_bigfloat2Dlinear, | ||
prob_ode_2Dlinear | ||
|
||
## Convergence Testing | ||
println("Convergence Test on Linear") | ||
|
||
testTol = 1 | ||
prob = prob_ode_2Dlinear | ||
println("Feagin RKs") | ||
dts = (1//2) .^ (4:-1:2) | ||
sol = solve(prob,Feagin10(),dt=dts[1]) | ||
prob = remake(prob_ode_bigfloat2Dlinear,tspan=(big(0)//1,big(1)//1)) | ||
sol = solve(prob,Feagin10(),dt=dts[1]) | ||
|
||
prob = remake(prob_ode_bigfloat2Dlinear,tspan=(big(0.0),big(1.0))) | ||
dts = (1//2) .^ (4:-1:2) | ||
sim = test_convergence(dts,prob,Feagin10()) | ||
@test abs(sim.𝒪est[:final]-8) < testTol #Lowered due to low test dt | ||
|
||
sim = test_convergence(dts,prob,Feagin12()) | ||
@test abs(sim.𝒪est[:final]-12) < testTol | ||
|
||
sim = test_convergence(dts,prob,Feagin14()) | ||
@test abs(sim.𝒪est[:final]-15) < testTol #Upped to 15 for test | ||
|
||
prob = prob_ode_bigfloatlinear | ||
|
||
dts = (1//2) .^ (6:-1:3) | ||
sim = test_convergence(dts,prob,Feagin10()) | ||
@test abs(sim.𝒪est[:final]-10) < testTol | ||
|
||
dts = (1//2) .^ (4:-1:2) | ||
sim = test_convergence(dts,prob,Feagin12()) | ||
@test abs(sim.𝒪est[:final]-12) < testTol | ||
|
||
sim = test_convergence(dts,prob,Feagin14()) | ||
@test abs(sim.𝒪est[:final]-15) < testTol #Upped to 15 for test | ||
|
||
prob = prob_ode_bigfloat2Dlinear | ||
|
||
#compile | ||
sol =solve(prob,Feagin10(),dt=dts[1]) | ||
sol =solve(prob,Feagin12(),dt=dts[1]) | ||
sol =solve(prob,Feagin14(),dt=dts[1]) | ||
|
||
#test | ||
@time sol =solve(prob,Feagin10(),dt=dts[1]) | ||
@time sol =solve(prob,Feagin12(),dt=dts[1]) | ||
@time sol =solve(prob,Feagin14(),dt=dts[1]) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.