Skip to content

Commit

Permalink
Merge pull request #18 from QuEraComputing/14-make-option-option-type
Browse files Browse the repository at this point in the history
switching to `@option` structs.
  • Loading branch information
weinbe58 authored Jan 5, 2024
2 parents b6f2e17 + 19ea134 commit 3005c76
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ jobs:
matrix:
version:
- "1"
- "1.9"
# - "nightly"
- "1.6"
- "nightly"
os:
- ubuntu-latest
# - macos-latest
Expand Down
1 change: 1 addition & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ authors = ["John Long<[email protected]>", "Phillip Weinberg<[email protected]>"
version = "0.5.0"

[deps]
Configurations = "5218b696-f38b-4ac9-8b61-a12ec717816d"

[compat]
julia = "1"
1 change: 1 addition & 0 deletions src/DormandPrince.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module DormandPrince

using Base.Iterators:repeated, Repeated
using Configurations: @option

# internal imports
include("types.jl")
Expand Down
4 changes: 2 additions & 2 deletions src/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ struct Report{T <: Real}
num_rejected_steps::Int
end

@kwdef struct Options{T <: Real}
@option struct Options{T <: Real}
# originally in work[1] - work[7]
uround::T = eps(T)
safety_factor:: T = 0.9
Expand Down Expand Up @@ -66,7 +66,7 @@ function Consts(expo1::T, options::Options{T}) where T
end


@kwdef mutable struct Vars{T <: Real}
@option mutable struct Vars{T <: Real}
x::T = zero(T)
xph::T = zero(T)
h::T = zero(T)
Expand Down

0 comments on commit 3005c76

Please sign in to comment.