Skip to content

Commit 70b3861

Browse files
Update examples/structured_2d_dgsem/elixir_euler_convergence_implicit_sparse_jacobian.jl
1 parent 07589c2 commit 70b3861

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

examples/structured_2d_dgsem/elixir_euler_convergence_implicit_sparse_jacobian.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,11 @@ sparse_adtype = AutoSparse(ad_type)
131131

132132
# `sparse_cache` will reduce calculation time when Jacobian is calculated multiple times
133133
sparse_cache = sparse_jacobian_cache(sparse_adtype, sd, rhs, du_ode, u0_ode)
134-
# the jacobian eventually can be computed in-place using `sparse_jacobian!(J_prealloc, sparse_adtype, sparse_cache, rhs, du_ode, u0_ode)` where `J_prealloc` is a copy of `J`.
134+
# the jacobian eventually can be computed in-place using
135+
# `sparse_jacobian!(J_prealloc, sparse_adtype, sparse_cache, rhs, du_ode, u0_ode)`
136+
# where `J_prealloc` is constructed via
137+
# `J = sparse_jacobian(sparse_adtype, sparse_cache, rhs, du_ode, u0_ode)`
138+
# `J_prealloc = similar(J)`
135139

136140
###############################################################################################
137141
### Set up sparse-aware ODEProblem ###

0 commit comments

Comments
 (0)