Skip to content

Commit 9d04c00

Browse files
move comment
1 parent 43900a4 commit 9d04c00

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

examples/tree_2d_dgsem/elixir_advection_implicit_sparse_jacobian.jl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,16 @@ ode_float_jac_sparse = semidiscretize(semi_float, t_span,
118118
jac_prototype = sparse_cache.jac_prototype,
119119
colorvec = sparse_cache.coloring.colorvec)
120120

121-
# Note: We experimented for linear problems with providing the constant, sparse Jacobian directly via
121+
# Note: We tried for this linear problem providing the constant, sparse Jacobian directly via
122122
#
123123
# const jac_sparse = sparse_jacobian(sparse_adtype, sparse_cache, rhs, du_ode, u0_ode)
124-
# const jac_sparse_func!(J, u, p, t) = jac_sparse
124+
# function jac_sparse_func!(J, u, p, t)
125+
# J = jac_sparse
126+
# end
125127
# SciMLBase.ODEFunction(rhs!, jac_prototype=float.(jac_prototype), colorvec=colorvec, jac = jac_sparse_func!)
126128
#
127-
# which turned out to be significantly slower than just using the prototype and the coloring vector.
129+
# which turned out (for the considered problems) to be significantly slower than
130+
# just using the prototype and the coloring vector.
128131

129132
summary_callback = SummaryCallback()
130133
analysis_callback = AnalysisCallback(semi_float, interval = 10)

src/semidiscretization/semidiscretization.jl

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -137,17 +137,6 @@ function semidiscretize(semi::AbstractSemidiscretization, tspan;
137137
ode = SciMLBase.ODEFunction(rhs!, jac_prototype = float.(jac_prototype),
138138
colorvec = colorvec)
139139

140-
# Note: We experimented for linear problems with providing the constant, sparse Jacobian directly via
141-
#
142-
# const jac_sparse = sparse_jacobian(sparse_adtype, sparse_cache, rhs, du_ode, u0_ode)
143-
# function jac_sparse_func!(J, u, p, t)
144-
# J = jac_sparse
145-
# end
146-
# SciMLBase.ODEFunction(rhs!, jac_prototype=float.(jac_prototype), colorvec=colorvec, jac = jac_sparse_func!)
147-
#
148-
# which turned out (for the considered problems) to be significantly slower than
149-
# just using the prototype and the coloring vector.
150-
151140
return ODEProblem{iip, specialize}(ode, u0_ode, tspan, semi)
152141
else
153142
return ODEProblem{iip, specialize}(rhs!, u0_ode, tspan, semi)

0 commit comments

Comments
 (0)