Skip to content

Commit 607f5c4

Browse files
chore: apply suggestions from code review
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent fc7fcdb commit 607f5c4

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

docs/src/basics/sparsity_detection.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ If the `colorvec` is not provided, then it is computed on demand.
3434
row colorvec.
3535

3636
!!! warning
37-
37+
3838
Previously you could provide a `sparsity` argument to `NonlinearFunction` to specify
3939
the jacobian prototype. However, to avoid confusion, this is now deprecated. Instead,
4040
use the `jac_prototype` argument.
@@ -58,7 +58,7 @@ sparsity detection algorithms.
5858
## Case III: Sparse AD Type is being Used
5959

6060
!!! warning
61-
61+
6262
This is now deprecated. Please use the previous two cases instead.
6363

6464
If you constructed a Nonlinear Solver with a sparse AD type, for example

docs/src/tutorials/large_systems.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
This tutorial is for getting into the extra features of using NonlinearSolve.jl. Solving
44
ill-conditioned nonlinear systems requires specializing the linear solver on properties of
5-
the Jacobian in order to cut down on the `\mathcal{O}(n^3)` linear solve and the
6-
`\mathcal{O}(n^2)` back-solves. This tutorial is designed to explain the advanced usage of
5+
the Jacobian in order to cut down on the ``\mathcal{O}(n^3)`` linear solve and the
6+
``\mathcal{O}(n^2)`` back-solves. This tutorial is designed to explain the advanced usage of
77
NonlinearSolve.jl by solving the steady state stiff Brusselator partial differential
88
equation (BRUSS) using NonlinearSolve.jl.
99

1010
## Definition of the Brusselator Equation
1111

1212
!!! note
13-
13+
1414
Feel free to skip this section: it simply defines the example problem.
1515

1616
The Brusselator PDE is defined as follows:
@@ -117,11 +117,11 @@ However, if you know the sparsity of your problem, then you can pass a different
117117
type. For example, a `SparseMatrixCSC` will give a sparse matrix. Other sparse matrix types
118118
include:
119119

120-
- Bidiagonal
121-
- Tridiagonal
122-
- SymTridiagonal
123-
- BandedMatrix ([BandedMatrices.jl](https://github.com/JuliaLinearAlgebra/BandedMatrices.jl))
124-
- BlockBandedMatrix ([BlockBandedMatrices.jl](https://github.com/JuliaLinearAlgebra/BlockBandedMatrices.jl))
120+
- Bidiagonal
121+
- Tridiagonal
122+
- SymTridiagonal
123+
- BandedMatrix ([BandedMatrices.jl](https://github.com/JuliaLinearAlgebra/BandedMatrices.jl))
124+
- BlockBandedMatrix ([BlockBandedMatrices.jl](https://github.com/JuliaLinearAlgebra/BlockBandedMatrices.jl))
125125

126126
## Approximate Sparsity Detection & Sparse Jacobians
127127

@@ -167,7 +167,7 @@ and `u` and call `jacobian_sparsity` on our function with the example arguments,
167167
kick out a sparse matrix with our pattern, that we can turn into our `jac_prototype`.
168168

169169
!!! tip
170-
170+
171171
Alternatively you can use the `SparseConnectivityTracer.jl` package to automatically
172172
generate a sparse Jacobian.
173173

@@ -224,7 +224,7 @@ choices, see the
224224
`linsolve` choices are any valid [LinearSolve.jl](https://linearsolve.sciml.ai/dev/) solver.
225225

226226
!!! note
227-
227+
228228
Switching to a Krylov linear solver will automatically change the nonlinear problem
229229
solver into Jacobian-free mode, dramatically reducing the memory required. This can be
230230
overridden by adding `concrete_jac=true` to the algorithm.
@@ -330,7 +330,7 @@ prob_brusselator_2d_exact_tracer = NonlinearProblem(
330330
u0, p; abstol = 1e-10, reltol = 1e-10)
331331
prob_brusselator_2d_approx_di = NonlinearProblem(
332332
NonlinearFunction(brusselator_2d_loop;
333-
sparsity = DenseSparsityDetector(AutoForwardDiff(); atol=1e-4)),
333+
sparsity = DenseSparsityDetector(AutoForwardDiff(); atol = 1e-4)),
334334
u0, p; abstol = 1e-10, reltol = 1e-10)
335335
336336
@btime solve(prob_brusselator_2d_exact_symbolics, NewtonRaphson());

0 commit comments

Comments
 (0)