Skip to content

Commit

Permalink
Try #1375:
Browse files Browse the repository at this point in the history
  • Loading branch information
bors[bot] authored Jul 17, 2023
2 parents a4806c1 + 4748802 commit bce8ee9
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions examples/column/hydrostatic_implicit.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using LinearAlgebra
import ClimaTimeSteppers as CTS
import ClimaCore:
Fields,
Domains,
Expand Down Expand Up @@ -233,11 +234,13 @@ ndays = 1.0

# Solve the ODE operator
prob = ODEProblem(
ODEFunction(
tendency!,
jac = jacobian!,
jac_prototype = zeros(length(Y), length(Y)),
tgrad = (dT, Y, p, t) -> fill!(dT, 0),
CTS.ClimaODEFunction(;
T_imp! = ODEFunction(;
Wfact = Wfact!,
tendency!,
jac = jacobian!,
jac_prototype = zeros(length(Y), length(Y)),
),
),
Y,
(0.0, 60 * 60 * 24 * ndays),
Expand All @@ -246,7 +249,7 @@ prob = ODEProblem(
sol = solve(
prob,
# ImplicitEuler(),
Rosenbrock23(linsolve = linsolve!),
CTS.IMEXAlgorithm(CTS.ARS343(), CTS.NewtonsMethod()),
dt = Δt,
saveat = 60 * 60, # save every hour
progress = true,
Expand Down

0 comments on commit bce8ee9

Please sign in to comment.