Skip to content

Commit 8aa62cc

Browse files
committed
change keywords
1 parent a1d9662 commit 8aa62cc

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "InfinitesimalGenerators"
22
uuid = "2fce0c6f-5f0b-5c85-85c9-2ffe1d5ee30d"
3-
version = "2.2.0"
3+
version = "2.3.0"
44

55
[deps]
66
Arpack = "7d9fca2a-8960-54d3-9f78-7d1dccf2cb97"

src/derivatives.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1+
# bc corresponds to value of first derivative outside the grid. Default to (0, 0), which corresponds to reflecting.
22
struct FirstDerivative{T, X <: AbstractVector{<:Real}, Y <: AbstractVector{<: Real}} <: AbstractVector{T}
33
x::X
44
y::Y
@@ -7,20 +7,20 @@ struct FirstDerivative{T, X <: AbstractVector{<:Real}, Y <: AbstractVector{<: Re
77
function FirstDerivative(x, y, bc, direction)
88
size(x) == size(y) || throw(DimensionMismatch(
99
"cannot match grid of length $(length(x)) with vector of length $(length(y))"))
10-
direction (:upward, :downward) || throw(ArgumentError("direction must be :upward or :downward"))
10+
direction (:forward, :backward) || throw(ArgumentError("direction must be :forward or :backward"))
1111
return new{float(eltype(y)), typeof(x), typeof(y)}(x, y, bc, direction)
1212
end
1313
end
1414

15-
FirstDerivative(x, y; bc = (0, 0), direction = :upward) = FirstDerivative(x, y, bc, direction)
15+
FirstDerivative(x, y; bc = (0, 0), direction = :forward) = FirstDerivative(x, y, bc, direction)
1616

1717
Base.size(d::FirstDerivative) = (length(d.x), 1)
1818

1919
Base.IndexStyle(d::FirstDerivative) = IndexLinear()
2020

2121
function Base.getindex(d::FirstDerivative{T}, i::Int) where {T}
2222
x, y, bc, direction = d.x, d.y, d.bc, d.direction
23-
if direction == :upward
23+
if direction == :forward
2424
if i == length(x)
2525
return convert(T, bc[end])
2626
else

0 commit comments

Comments
 (0)