-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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.
Sorry, something went wrong. |
||
if isexplicit(stepper) | ||
return eval(Expr(:call, fullsteppername, eq)) | ||
else | ||
return eval(Expr(:call, fullsteppername, eq, dt)) | ||
|
@@ -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 | ||
|
||
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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.
Sorry, something went wrong.
glwagner
Member
|
||
ζαβΓ = [ 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) | ||
|
@@ -465,6 +465,6 @@ function getetdcoeffs(dt, L; ncirc=32, rcirc=1) | |
β = real.(β) | ||
Γ = real.(Γ) | ||
end | ||
|
||
ζ, α, β, Γ | ||
end |
1 comment
on commit 8d1f3a8
There was a problem hiding this comment.
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.
@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...