Skip to content

Commit

Permalink
docs: update advanced.md
Browse files Browse the repository at this point in the history
  • Loading branch information
sathvikbhagavan authored Oct 12, 2023
1 parent cbfeb2f commit 5e095f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/src/tutorials/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ For more information on the preconditioner interface, see the
To cut down the of Jacobian building overhead, we can choose to exploit the sparsity pattern and deploy matrix coloring during Jacobian construction. With NonlinearSolve.jl, we can simply use `autodiff=AutoSparseForwardDiff()` to automatically exploit the sparsity pattern of Jacobian matrices:

```@example ill_conditioned_nlprob
@benchmark solve(prob_brusselator_2d,
@btime solve(prob_brusselator_2d,
NewtonRaphson(linsolve = KrylovJL_GMRES(), precs = incompletelu, concrete_jac = true,
autodiff = AutoSparseForwardDiff()));
nothing # hide
Expand All @@ -295,7 +295,7 @@ colorvec = ArrayInterface.matrix_colors(jac_sparsity)
ff = NonlinearFunction(brusselator_2d_loop; jac_prototype = float.(jac_sparsity), colorvec)
prob_brusselator_2d_sparse = NonlinearProblem(ff, u0, p)
@benchmark solve(prob_brusselator_2d_sparse,
@btime solve(prob_brusselator_2d_sparse,
NewtonRaphson(linsolve = KrylovJL_GMRES(), precs = incompletelu, concrete_jac = true,
autodiff = AutoSparseForwardDiff()));
nothing # hide
Expand Down

0 comments on commit 5e095f2

Please sign in to comment.