Skip to content

Commit

Permalink
fixes typo in getetdcoeffs function arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
navidcy committed Oct 30, 2018
1 parent 44741a0 commit 8d1f3a8
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/timesteppers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ end
Step forward `prob` for `nsteps`.
"""
function stepforward!(prob::Problem, nsteps::Int)
function stepforward!(prob::Problem, nsteps::Int)
for step = 1:nsteps
stepforward!(prob)
end
Expand Down Expand Up @@ -46,12 +46,12 @@ isexplicit(stepper) = any(Symbol(stepper) .== fullyexplicitsteppers)

"""
TimeStepper(stepper, eq, dt=nothing)
Generalized timestepper constructor. If `stepper` is explicit, `dt` is not used.
"""
function TimeStepper(stepper, eq, dt=nothing)
fullsteppername = Symbol(stepper, :TimeStepper)
if isexplicit(stepper)

This comment has been minimized.

Copy link
@navidcy

navidcy Oct 30, 2018

Author Member

@glwagner:
I hate it when this happens...
I didn't change anything in this line and in most of them. It's something that has to do with our editors and how they handle line breaks etc...

if isexplicit(stepper)
return eval(Expr(:call, fullsteppername, eq))
else
return eval(Expr(:call, fullsteppername, eq, dt))
Expand Down Expand Up @@ -106,7 +106,7 @@ ForwardEulerTimeStepper(eq::Equation) = ForwardEulerTimeStepper(superzeros(eq.T,
Construct a forward Euler timestepper with spectral filtering.
"""
struct FilteredForwardEulerTimeStepper{T,Tf} <: AbstractTimeStepper{T}
N::T
N::T
filter::Tf
end

Expand Down Expand Up @@ -137,7 +137,7 @@ const third = 1/3
Construct a 4th-order Runge-Kutta time stepper.
"""
struct RK4TimeStepper{T} <: AbstractTimeStepper{T}
sol₁::T
sol₁::T
RHS₁::T
RHS₂::T
RHS₃::T
Expand All @@ -150,7 +150,7 @@ end
Construct a 4th-order Runge-Kutta time stepper with spectral filtering for the equation `eq`.
"""
struct FilteredRK4TimeStepper{T,Tf} <: AbstractTimeStepper{T}
sol₁::T
sol₁::T
RHS₁::T
RHS₂::T
RHS₃::T
Expand Down Expand Up @@ -229,15 +229,15 @@ Construct a 4th-order exponential-time-differencing Runge-Kutta time stepper. Th
"""
struct ETDRK4TimeStepper{T,TL} <: AbstractTimeStepper{T}
# ETDRK4 coefficents
ζ::TL
ζ::TL
α::TL
β::TL
Γ::TL
expLdt::TL
expLdt2::TL
sol₁::T
sol₂::T
N₁::T
N₁::T
N₂::T
N₃::T
N₄::T
Expand All @@ -250,15 +250,15 @@ Construct a 4th-order exponential-time-differencing Runge-Kutta time stepper wit
"""
struct FilteredETDRK4TimeStepper{T,TL,Tf} <: AbstractTimeStepper{T}
# ETDRK4 coefficents:
ζ::TL
ζ::TL
α::TL
β::TL
Γ::TL
expLdt::TL
expLdt2::TL
sol₁::T
sol₁::T
sol₂::T
N₁::T
N₁::T
N₂::T
N₃::T
N₄::T
Expand Down Expand Up @@ -422,14 +422,14 @@ function getexpLs(dt, eq)
expLdt, expLdt2
end

function getetdcoeffs(dt, L<:AbstractArray{T}; kwargs...) where T<:AbstractArray
function getetdcoeffs(dt, L::AbstractArray{T}; kwargs...) where T<:AbstractArray

This comment has been minimized.

Copy link
@glwagner

glwagner Oct 30, 2018

Member

What does this change mean? This function will be called in the general case?

This comment has been minimized.

Copy link
@navidcy

navidcy Oct 30, 2018

Author Member

wasn't L<:AbstractArray{T} a typo?
I was getting an error... and I assumed that that was a typo

This comment has been minimized.

Copy link
@glwagner

glwagner Oct 30, 2018

Member

Sorry, I mistook which line was original and which was new.

This comment has been minimized.

Copy link
@navidcy

navidcy Oct 30, 2018

Author Member

did you have coffee yet? :)

ζαβΓ = [ getetdcoeffs(dt, Li) for Li in L ]
ζ = map(x->x[1], ζαβΓ)
α = map(x->x[2], ζαβΓ)
β = map(x->x[3], ζαβΓ)
Γ = map(x->x[4], ζαβΓ)
ζ, α, β, Γ
end
end

"""
getetdcoeffs(dt, L; ncirc=32, rcirc=1)
Expand Down Expand Up @@ -465,6 +465,6 @@ function getetdcoeffs(dt, L; ncirc=32, rcirc=1)
β = real.(β)
Γ = real.(Γ)
end

ζ, α, β, Γ
end

1 comment on commit 8d1f3a8

@glwagner
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will look into whether vim is doing something undesirable.

Please sign in to comment.