@@ -418,10 +418,10 @@ function update_jacobian!(alg::ManualSparseJacobian, cache, Y, p, dtγ, t)
418418 ᶜdiffusion_u_matrix,
419419 ᶜtridiagonal_matrix_scalar,
420420 ᶠsed_tracer_advection,
421- ᶠtracer_advection,
422- ᶠtracer_advection_upwind,
421+ ᶜtracer_advection,
423422 ᶠbidiagonal_matrix_ct3,
424423 ᶠbidiagonal_matrix_ct3_2,
424+ ᶜtridiagonal_matrix_c3,
425425 ᶠtridiagonal_matrix_c3,
426426 ) = p. scratch
427427 rs = p. atmos. rayleigh_sponge
@@ -1091,8 +1091,8 @@ function update_jacobian!(alg::ManualSparseJacobian, cache, Y, p, dtγ, t)
10911091
10921092 # sedimentation
10931093 # (pull out common subexpression for performance)
1094- ᶠsed_tracer_advection =
1095- @. DiagonalMatrixRow (ᶠinterp (ᶜρʲs.:(1 ) * ᶜJ) / ᶠJ) ⋅
1094+ @. ᶠsed_tracer_advection =
1095+ DiagonalMatrixRow (ᶠinterp (ᶜρʲs.:(1 ) * ᶜJ) / ᶠJ) ⋅
10961096 ᶠright_bias_matrix () ⋅
10971097 DiagonalMatrixRow (- Geometry. WVector (ᶜwʲ))
10981098 @. ᶜtridiagonal_matrix_scalar =
@@ -1365,10 +1365,10 @@ function update_jacobian!(alg::ManualSparseJacobian, cache, Y, p, dtγ, t)
13651365
13661366 # pull common subexpressions that don't depend on which
13671367 # tracer out of the tracer loop for performance
1368- ᶠtracer_advection = @. - (ᶜadvdivᵥ_matrix ()) ⋅
1368+ @. ᶜtracer_advection = - (ᶜadvdivᵥ_matrix ()) ⋅
13691369 DiagonalMatrixRow (ᶠinterp (ᶜρʲs.:(1 ) * ᶜJ) / ᶠJ)
1370- ᶠtracer_advection_upwind =
1371- @. ᶠtracer_advection ⋅ ᶠset_tracer_upwind_matrix_bcs (
1370+ @. ᶜtridiagonal_matrix_c3 =
1371+ ᶜtracer_advection ⋅ ᶠset_tracer_upwind_matrix_bcs (
13721372 ᶠtracer_upwind_matrix (ᶠu³ʲs.:(1 )),
13731373 )
13741374 MatrixFields. unrolled_foreach (
@@ -1381,21 +1381,21 @@ function update_jacobian!(alg::ManualSparseJacobian, cache, Y, p, dtγ, t)
13811381 matrix[ρχ_name, χʲ_name]
13821382 @. ∂ᶜρχ_err_∂ᶜχʲ =
13831383 dtγ *
1384- ᶠtracer_advection_upwind ⋅
1384+ ᶜtridiagonal_matrix_c3 ⋅
13851385 DiagonalMatrixRow (draft_area (Y. c. sgsʲs.:(1 ). ρa, ᶜρʲs.:(1 )))
13861386
13871387 ∂ᶜρχ_err_∂ᶜρa =
13881388 matrix[ρχ_name, @name (c. sgsʲs.:(1 ). ρa)]
13891389 @. ∂ᶜρχ_err_∂ᶜρa =
13901390 dtγ *
1391- ᶠtracer_advection_upwind ⋅
1391+ ᶜtridiagonal_matrix_c3 ⋅
13921392 DiagonalMatrixRow (ᶜχʲ / ᶜρʲs.:(1 ))
13931393
13941394 ∂ᶜρχ_err_∂ᶠu₃ʲ =
13951395 matrix[ρχ_name, @name (f. sgsʲs.:(1 ). u₃)]
13961396 @. ∂ᶜρχ_err_∂ᶠu₃ʲ =
13971397 dtγ * (
1398- ᶠtracer_advection ⋅
1398+ ᶜtracer_advection ⋅
13991399 DiagonalMatrixRow (
14001400 ᶠset_tracer_upwind_bcs (
14011401 ᶠtracer_upwind (CT3 (sign (ᶠu³ʲ_data)),
0 commit comments