Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove precs #584

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/alg_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ SciMLBase.alg_interpretation(alg::RKMil{interpretation}) where {interpretation}
SciMLBase.alg_interpretation(alg::SROCK1{interpretation,E}) where {interpretation,E} = interpretation
SciMLBase.alg_interpretation(alg::RKMilCommute) = alg.interpretation
SciMLBase.alg_interpretation(alg::RKMilGeneral) = alg.interpretation
SciMLBase.alg_interpretation(alg::ImplicitRKMil{CS,AD,F,P,FDT,ST,CJ,N,T2,Controller,interpretation}) where {CS,AD,F,P,FDT,ST,CJ,N,T2,Controller,interpretation} = interpretation
SciMLBase.alg_interpretation(alg::ImplicitRKMil{CS,AD,F,FDT,ST,CJ,N,T2,Controller,interpretation}) where {CS,AD,F,FDT,ST,CJ,N,T2,Controller,interpretation} = interpretation

SciMLBase.alg_interpretation(alg::RS1) = :Stratonovich
SciMLBase.alg_interpretation(alg::RS2) = :Stratonovich
Expand Down
48 changes: 18 additions & 30 deletions src/algorithms.jl
Original file line number Diff line number Diff line change
Expand Up @@ -634,29 +634,27 @@ This is a theta method which defaults to theta=1 or the Trapezoid method on the
This method defaults to symplectic=false, but when true and theta=1/2 this is the implicit Midpoint method on the drift term and is symplectic in distribution.
Can handle all forms of noise, including non-diagonal, scalar, and colored noise. Uses a 1.0/1.5 heuristic for adaptive time stepping.
"""
struct ImplicitEM{CS,AD,F,F2,P,FDT,ST,CJ,T2,Controller} <: StochasticDiffEqNewtonAdaptiveAlgorithm{CS,AD,FDT,ST,CJ,Controller}
struct ImplicitEM{CS,AD,F,F2,FDT,ST,CJ,T2,Controller} <: StochasticDiffEqNewtonAdaptiveAlgorithm{CS,AD,FDT,ST,CJ,Controller}
linsolve::F
nlsolve::F2
precs::P
theta::T2
extrapolant::Symbol
new_jac_conv_bound::T2
symplectic::Bool
end
ImplicitEM(;chunk_size=0,autodiff=true,diff_type=Val{:central},
standardtag = Val{true}(),concrete_jac = nothing,
precs = OrdinaryDiffEq.DEFAULT_PRECS,
linsolve=nothing,nlsolve=NLNewton(),
extrapolant=:constant,
theta = 1,symplectic=false,
new_jac_conv_bound = 1e-3,
controller = :Predictive) =
ImplicitEM{chunk_size,autodiff,
typeof(linsolve),typeof(nlsolve),typeof(precs),diff_type,
typeof(linsolve),typeof(nlsolve),diff_type,
OrdinaryDiffEq._unwrap_val(standardtag),
OrdinaryDiffEq._unwrap_val(concrete_jac),
typeof(new_jac_conv_bound),controller}(
linsolve,nlsolve,precs,
linsolve,nlsolve,
symplectic ? 1/2 : theta,
extrapolant,new_jac_conv_bound,symplectic)

Expand All @@ -669,30 +667,28 @@ This is a theta method which defaults to theta=1/2 or the Trapezoid method on th
This method defaults to symplectic=false, but when true and theta=1 this is the implicit Midpoint method on the drift term and is symplectic in distribution.
Can handle all forms of noise, including non-diagonal, scalar, and colored noise. Uses a 1.0/1.5 heuristic for adaptive time stepping.
"""
struct ImplicitEulerHeun{CS,AD,F,P,FDT,ST,CJ,N,T2,Controller} <: StochasticDiffEqNewtonAdaptiveAlgorithm{CS,AD,FDT,ST,CJ,Controller}
struct ImplicitEulerHeun{CS,AD,F,FDT,ST,CJ,N,T2,Controller} <: StochasticDiffEqNewtonAdaptiveAlgorithm{CS,AD,FDT,ST,CJ,Controller}
linsolve::F
nlsolve::N
precs::P
theta::T2
extrapolant::Symbol
new_jac_conv_bound::T2
symplectic::Bool
end
ImplicitEulerHeun(;chunk_size=0,autodiff=true,diff_type=Val{:central},
standardtag = Val{true}(),concrete_jac = nothing,
precs = OrdinaryDiffEq.DEFAULT_PRECS,
linsolve=nothing,nlsolve=NLNewton(),
extrapolant=:constant,
theta = 1,symplectic = false,
new_jac_conv_bound = 1e-3,
controller = :Predictive) =
ImplicitEulerHeun{chunk_size,autodiff,
typeof(linsolve),typeof(precs),diff_type,
typeof(linsolve),diff_type,
OrdinaryDiffEq._unwrap_val(standardtag),
OrdinaryDiffEq._unwrap_val(concrete_jac),
typeof(nlsolve),
typeof(new_jac_conv_bound),controller}(
linsolve,nlsolve,precs,
linsolve,nlsolve,
symplectic ? 1/2 : theta,
extrapolant,
new_jac_conv_bound,symplectic)
Expand All @@ -705,30 +701,28 @@ Defaults to solving the Ito problem, but ImplicitRKMil(interpretation=:Stratonov
This method defaults to symplectic=false, but when true and theta=1/2 this is the implicit Midpoint method on the drift term and is symplectic in distribution.
Handles diagonal and scalar noise. Uses a 1.5/2.0 heuristic for adaptive time stepping.
"""
struct ImplicitRKMil{CS,AD,F,P,FDT,ST,CJ,N,T2,Controller,interpretation} <: StochasticDiffEqNewtonAdaptiveAlgorithm{CS,AD,FDT,ST,CJ,Controller}
struct ImplicitRKMil{CS,AD,F,FDT,ST,CJ,N,T2,Controller,interpretation} <: StochasticDiffEqNewtonAdaptiveAlgorithm{CS,AD,FDT,ST,CJ,Controller}
linsolve::F
nlsolve::N
precs::P
theta::T2
extrapolant::Symbol
new_jac_conv_bound::T2
symplectic::Bool
end
ImplicitRKMil(;chunk_size=0,autodiff=true,diff_type=Val{:central},
standardtag = Val{true}(),concrete_jac = nothing,
precs = OrdinaryDiffEq.DEFAULT_PRECS,
linsolve=nothing,nlsolve=NLNewton(),
extrapolant=:constant,
theta = 1,symplectic = false,
new_jac_conv_bound = 1e-3,
controller = :Predictive,interpretation=:Ito) =
ImplicitRKMil{chunk_size,autodiff,
typeof(linsolve),typeof(precs),diff_type,
typeof(linsolve),diff_type,
OrdinaryDiffEq._unwrap_val(standardtag),
OrdinaryDiffEq._unwrap_val(concrete_jac),
typeof(nlsolve),typeof(new_jac_conv_bound),
controller,interpretation}(
linsolve,nlsolve,precs,
linsolve,nlsolve,
symplectic ? 1/2 : theta,
extrapolant,
new_jac_conv_bound,symplectic)
Expand All @@ -740,30 +734,28 @@ This is a theta method which defaults to theta=1 or the Trapezoid method on the
This method defaults to symplectic=false, but when true and theta=1/2 this is the implicit Midpoint method on the drift term and is symplectic in distribution.
Can handle all forms of noise, including non-diagonal, scalar, and colored noise. Uses a 1.0/1.5 heuristic for adaptive time stepping.
"""
struct ISSEM{CS,AD,F,P,FDT,ST,CJ,N,T2,Controller} <: StochasticDiffEqNewtonAdaptiveAlgorithm{CS,AD,FDT,ST,CJ,Controller}
struct ISSEM{CS,AD,F,FDT,ST,CJ,N,T2,Controller} <: StochasticDiffEqNewtonAdaptiveAlgorithm{CS,AD,FDT,ST,CJ,Controller}
linsolve::F
nlsolve::N
precs::P
theta::T2
extrapolant::Symbol
new_jac_conv_bound::T2
symplectic::Bool
end
ISSEM(;chunk_size=0,autodiff=true,diff_type=Val{:central},
standardtag = Val{true}(),concrete_jac = nothing,
precs = OrdinaryDiffEq.DEFAULT_PRECS,
linsolve=nothing,nlsolve=NLNewton(),
extrapolant=:constant,
theta = 1,symplectic=false,
new_jac_conv_bound = 1e-3,
controller = :Predictive) =
ISSEM{chunk_size,autodiff,
typeof(linsolve),typeof(precs),diff_type,
typeof(linsolve),diff_type,
OrdinaryDiffEq._unwrap_val(standardtag),
OrdinaryDiffEq._unwrap_val(concrete_jac),
typeof(nlsolve),
typeof(new_jac_conv_bound),controller}(
linsolve,nlsolve,precs,
linsolve,nlsolve,
symplectic ? 1/2 : theta,
extrapolant,
new_jac_conv_bound,symplectic)
Expand All @@ -775,29 +767,27 @@ This is a theta method which defaults to theta=1 or the Trapezoid method on the
This method defaults to symplectic=false, but when true and theta=1/2 this is the implicit Midpoint method on the drift term and is symplectic in distribution.
Can handle all forms of noise, including non-diagonal,Q scalar, and colored noise. Uses a 1.0/1.5 heuristic for adaptive time stepping.
"""
struct ISSEulerHeun{CS,AD,F,P,FDT,ST,CJ,N,T2,Controller} <: StochasticDiffEqNewtonAdaptiveAlgorithm{CS,AD,FDT,ST,CJ,Controller}
struct ISSEulerHeun{CS,AD,F,FDT,ST,CJ,N,T2,Controller} <: StochasticDiffEqNewtonAdaptiveAlgorithm{CS,AD,FDT,ST,CJ,Controller}
linsolve::F
nlsolve::N
precs::P
theta::T2
extrapolant::Symbol
new_jac_conv_bound::T2
symplectic::Bool
end
ISSEulerHeun(;chunk_size=0,autodiff=true,diff_type=Val{:central},
standardtag = Val{true}(),concrete_jac = nothing,
precs = OrdinaryDiffEq.DEFAULT_PRECS,
linsolve=nothing,nlsolve=NLNewton(),
extrapolant=:constant,
theta = 1,symplectic=false,
new_jac_conv_bound = 1e-3,
controller = :Predictive) =
ISSEulerHeun{chunk_size,autodiff,
typeof(linsolve),typeof(precs),diff_type,
typeof(linsolve),diff_type,
OrdinaryDiffEq._unwrap_val(standardtag),
OrdinaryDiffEq._unwrap_val(concrete_jac),
typeof(nlsolve),typeof(new_jac_conv_bound),controller}(
linsolve,nlsolve,precs,
linsolve,nlsolve,
symplectic ? 1/2 : theta,
extrapolant,
new_jac_conv_bound,symplectic)
Expand All @@ -806,10 +796,9 @@ SKenCarp: Stiff Method
Adaptive L-stable drift-implicit strong order 1.5 for additive Ito and Stratonovich SDEs with weak order 2.
Can handle diagonal, non-diagonal and scalar additive noise.
"""
struct SKenCarp{CS,AD,F,P,FDT,ST,CJ,N,T2,Controller} <: StochasticDiffEqNewtonAdaptiveAlgorithm{CS,AD,FDT,ST,CJ,Controller}
struct SKenCarp{CS,AD,F,FDT,ST,CJ,N,T2,Controller} <: StochasticDiffEqNewtonAdaptiveAlgorithm{CS,AD,FDT,ST,CJ,Controller}
linsolve::F
nlsolve::N
precs::P
smooth_est::Bool
extrapolant::Symbol
new_jac_conv_bound::T2
Expand All @@ -818,15 +807,14 @@ end

SKenCarp(;chunk_size=0,autodiff=true,diff_type=Val{:central},
standardtag = Val{true}(),concrete_jac = nothing,
precs = OrdinaryDiffEq.DEFAULT_PRECS,
linsolve=nothing,nlsolve=NLNewton(),
smooth_est=true,extrapolant=:min_correct,
new_jac_conv_bound = 1e-3,controller = :Predictive,
ode_error_est = true) =
SKenCarp{chunk_size,autodiff,typeof(linsolve),typeof(precs),diff_type,
SKenCarp{chunk_size,autodiff,typeof(linsolve),diff_type,
OrdinaryDiffEq._unwrap_val(standardtag),OrdinaryDiffEq._unwrap_val(concrete_jac),
typeof(nlsolve),typeof(new_jac_conv_bound),controller}(
linsolve,nlsolve,precs,smooth_est,extrapolant,new_jac_conv_bound,
linsolve,nlsolve,smooth_est,extrapolant,new_jac_conv_bound,
ode_error_est)


Expand Down
Loading