Skip to content

Commit a295c7b

Browse files
committed
Ignore the derivative of 1/ρ in the Jacobian
1 parent 24b8929 commit a295c7b

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/prognostic_equations/implicit/manual_sparse_jacobian.jl

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -462,16 +462,9 @@ function update_jacobian!(alg::ManualSparseJacobian, cache, Y, p, dtγ, t)
462462

463463
∂ᶠu₃_err_∂ᶜρ = matrix[@name(f.u₃), @name(c.ρ)]
464464
∂ᶠu₃_err_∂ᶜρe_tot = matrix[@name(f.u₃), @name(c.ρe_tot)]
465-
466-
ᶜθ_v = @. lazy(theta_v(thermo_params, ᶜts))
467-
ᶜΠ = @. lazy(exner_function(thermo_params, ᶜts))
468465
@. ∂ᶠu₃_err_∂ᶜρ =
469-
dtγ * (
470-
ᶠp_grad_matrix
471-
DiagonalMatrixRow(ᶜkappa_m * (T_0 * cp_d - ᶜK - ᶜΦ)) +
472-
DiagonalMatrixRow(cp_d * ᶠinterp(ᶜθ_v) * ᶠgradᵥ(ᶜΠ) / ᶠinterp(ᶜρ))
473-
ᶠinterp_matrix()
474-
)
466+
dtγ * ᶠp_grad_matrix
467+
DiagonalMatrixRow(ᶜkappa_m * (T_0 * cp_d - ᶜK - ᶜΦ))
475468
@. ∂ᶠu₃_err_∂ᶜρe_tot = dtγ * ᶠp_grad_matrix DiagonalMatrixRow(ᶜkappa_m)
476469
ᶜe_tot = @. lazy(specific(Y.c.ρe_tot, Y.c.ρ))
477470
if MatrixFields.has_field(Y, @name(c.ρq_tot))

0 commit comments

Comments
 (0)