-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
63 additions
and
2 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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using DelayDiffEq, DDEProblemLibrary | ||
|
||
# For now, testing if the old keyword works the same as the new alias keyword | ||
prob_ip = prob_dde_constant_1delay_ip | ||
prob_scalar = prob_dde_constant_1delay_scalar | ||
ts = 0:0.1:10 | ||
|
||
noreuse = NLNewton(fast_convergence_cutoff = 0) | ||
|
||
const working_algs = [ImplicitMidpoint(), SSPSDIRK2(), KenCarp5(nlsolve = noreuse), | ||
ImplicitEuler(nlsolve = noreuse), Trapezoid(nlsolve = noreuse), | ||
TRBDF2(nlsolve = noreuse)] | ||
|
||
@testset "Algorithm $(nameof(typeof(alg)))" for alg in working_algs | ||
println(nameof(typeof(alg))) | ||
|
||
stepsalg = MethodOfSteps(alg) | ||
sol_new_alias = solve(prob_ip, stepsalg; dt = 0.1, alias = DDEAliasSpecifier(alias_u0 = true)) | ||
sol_old_alias = solve( | ||
prob_ip, stepsalg; dt = 0.1, alias = alias_u0 = true) | ||
|
||
@test sol_new_alias == sol_old_alias | ||
end |