-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add support for ITime in IMEXAlgorithms and SSPKnoth #360
Conversation
369265c
to
7c39ce3
Compare
src/arbitrary_number_types.jl
Outdated
SciMLBase.allows_arbitrary_number_types(alg::T) | ||
where {T <: ClimaTimeSteppers.IMEXAlgorithm} | ||
|
||
Return `true`. Enable ARS343 to run with `ClimaUtilities.ITime`. |
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.
Return `true`. Enable ARS343 to run with `ClimaUtilities.ITime`. | |
Return `true`. Enable IMEXAlgorithms to run with `ClimaUtilities.ITime`. |
function tstops_and_saveat_heaps(t0, tf, tstops, saveat) | ||
FT = typeof(tf) | ||
function tstops_and_saveat_heaps(t0, tf, tstops, saveat = []) | ||
FT = typeof(first(promote(t0, tf))) |
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.
FT = typeof(first(promote(t0, tf))) | |
# We promote to a common type to ensure that t0 and tf have the same type | |
FT = typeof(first(promote(t0, tf))) |
|
||
dt > zero(dt) || error("dt must be positive") | ||
dt > zero(oneunit(dt)) || error("dt must be positive") |
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.
dt > zero(oneunit(dt)) || error("dt must be positive") | |
# We need zero(oneunit()) because there's no zerounit | |
dt > zero(oneunit(dt)) || error("dt must be positive") |
src/solvers/imex_ark.jl
Outdated
@@ -135,6 +135,10 @@ end | |||
T_imp!(residual, U′, p, t_imp) | |||
@. residual = temp + dtγ * residual - U′ | |||
end | |||
implicit_equation_jacobian! = (jacobian, Ui) -> begin |
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.
Is this block of code maybe result of a missing/incomplete rebase?
38a52a2
to
53b2e81
Compare
NEWS.md
Outdated
@@ -7,6 +7,7 @@ v0.8.2 | |||
- ![][badge-💥breaking] If saveat is a number, then it does not automatically expand to `tspan[1]:saveat:tspan[2]`. To fix this, update | |||
`saveat`, which is a keyword in the integrator, to be an array. For example, if `saveat` is a scalar, replace it with | |||
`[tspan[1]:saveat:tspan[2]..., tspan[2]]` to achieve the same behavior as before. | |||
- ARS343 and SSPKnoth are compatible with ITime. See ClimaUtilities for more information about ITime. |
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.
- ARS343 and SSPKnoth are compatible with ITime. See ClimaUtilities for more information about ITime. | |
- IMEXAlgorithms and SSPKnoth are compatible with ITime. See ClimaUtilities for more information about ITime. |
c8a2f8d
to
a959b8a
Compare
This PR adds support for ITime in ARS343 and SSPKnoth. This PR should be merged in after PR#347.
See this issue in ClimaUtilities for the remaining PRs to merge for ITime.