Skip to content

Commit

Permalink
including dp8 in package.
Browse files Browse the repository at this point in the history
  • Loading branch information
weinbe58 committed Dec 22, 2023
1 parent 042ada3 commit adfe806
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/DormandPrince.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ include("hinit.jl")
include("checks.jl")
include("interface.jl")
include("dp5/mod.jl")
include("dp8/mod.jl")


using DormandPrince. DP5: core_integrator
Expand Down
4 changes: 2 additions & 2 deletions src/dp5/solver.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function core_integrator(
=#


h, dp5_report = dopcor(
h, report = dopcor(
solver, # contains x, y, k1, k2, k3, k4, k5, k6, y1, ysti, options
xend,
hmax,
Expand All @@ -60,7 +60,7 @@ function core_integrator(
# reset the necessary vars
solver.vars.last = false

return dp5_report
return report

end

Expand Down
12 changes: 7 additions & 5 deletions src/dp8/solver.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include("helpers.jl")

function core_integrator(

Check warning on line 6 in src/dp8/solver.jl

View check run for this annotation

Codecov / codecov/patch

src/dp8/solver.jl#L6

Added line #L6 was not covered by tests
solver::DP5Solver{T},
solver::DP8Solver{T},
xend::T
) where {T <: Real}

Expand Down Expand Up @@ -47,7 +47,7 @@ function core_integrator(
=#


h, dp5_report = dopcor(
h, report = dopcor(

Check warning on line 50 in src/dp8/solver.jl

View check run for this annotation

Codecov / codecov/patch

src/dp8/solver.jl#L50

Added line #L50 was not covered by tests
solver, # contains x, y, k1, k2, k3, k4, k5, k6, y1, ysti, options
xend,
hmax,
Expand All @@ -60,7 +60,7 @@ function core_integrator(
# reset the necessary vars
solver.vars.last = false

Check warning on line 61 in src/dp8/solver.jl

View check run for this annotation

Codecov / codecov/patch

src/dp8/solver.jl#L61

Added line #L61 was not covered by tests

return dp5_report
return report

Check warning on line 63 in src/dp8/solver.jl

View check run for this annotation

Codecov / codecov/patch

src/dp8/solver.jl#L63

Added line #L63 was not covered by tests

end

Expand All @@ -69,7 +69,7 @@ function dopcor(
xend,
hmax,
h,
)
) where T
##### Initializations
# replace sign with Julia-native Base.sign
# posneg = sign(1.0, xend-solver.vars.x)
Expand Down Expand Up @@ -122,7 +122,7 @@ function dopcor(

do_step!(solver, h)

Check warning on line 123 in src/dp8/solver.jl

View check run for this annotation

Codecov / codecov/patch

src/dp8/solver.jl#L123

Added line #L123 was not covered by tests

nfcn += 6
nfcn += 11

Check warning on line 125 in src/dp8/solver.jl

View check run for this annotation

Codecov / codecov/patch

src/dp8/solver.jl#L125

Added line #L125 was not covered by tests

###### Error Estimation
err = error_estimation(solver)

Check warning on line 128 in src/dp8/solver.jl

View check run for this annotation

Codecov / codecov/patch

src/dp8/solver.jl#L128

Added line #L128 was not covered by tests
Expand All @@ -142,6 +142,8 @@ function dopcor(
# TODO: enable / disable with Preferences.jl
xph = solver.vars.x + h
solver.f(xph, solver.k5, solver.k4)
nfcn += 1

Check warning on line 145 in src/dp8/solver.jl

View check run for this annotation

Codecov / codecov/patch

src/dp8/solver.jl#L143-L145

Added lines #L143 - L145 were not covered by tests

stiffness_detection!(solver, naccpt, h)

Check warning on line 147 in src/dp8/solver.jl

View check run for this annotation

Codecov / codecov/patch

src/dp8/solver.jl#L147

Added line #L147 was not covered by tests

solver.k1 .= solver.k4
Expand Down

0 comments on commit adfe806

Please sign in to comment.