Skip to content

Commit

Permalink
Run JuliaFormatter
Browse files Browse the repository at this point in the history
  • Loading branch information
adrhill committed Sep 4, 2024
1 parent f58c26c commit 515a277
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions docs/src/basics/solution.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,10 @@ Extra fields for solutions of specific problems are specified in the appropriate
problem definition page.

## Solution Function Stripping
By default solution objects store functions, making them difficult to serialize. Using the function

By default solution objects store functions, making them difficult to serialize. Using the function
`strip_solution(sol)`, a copy of the solution that does not contain any functions is created.

```@docs
SciMLBase.strip_solution
```
```
8 changes: 4 additions & 4 deletions docs/src/tutorials/advanced_ode_example.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,9 @@ Note that you should only do this if the sparsity is high, for example, 0.1%
of the matrix is non-zeros, otherwise the overhead of sparse matrices can be higher
than the gains from sparse differentiation!

[ADTypes.jl](https://github.com/SciML/ADTypes.jl) provides a [common interface for automatic sparsity detection](https://sciml.github.io/ADTypes.jl/stable/#Sparsity-detector)
[ADTypes.jl](https://github.com/SciML/ADTypes.jl) provides a [common interface for automatic sparsity detection](https://sciml.github.io/ADTypes.jl/stable/#Sparsity-detector)
via its function `jacobian_sparsity`.
This function can be called using sparsity detectors from [SparseConnectivityTracer.jl](https://github.com/adrhill/SparseConnectivityTracer.jl)
This function can be called using sparsity detectors from [SparseConnectivityTracer.jl](https://github.com/adrhill/SparseConnectivityTracer.jl)
or [Symbolics.jl](https://github.com/JuliaSymbolics/Symbolics.jl).

We can give an example `du` and `u` and call `jacobian_sparsity` on our function with the example arguments,
Expand All @@ -166,8 +166,8 @@ jac_sparsity = ADTypes.jacobian_sparsity(
Using a different backend for sparsity detection just requires swapping out the detector,
e.g. for Symbolics' [`SymbolicsSparsityDetector`](https://docs.sciml.ai/Symbolics/stable/manual/sparsity_detection/#Symbolics.SymbolicsSparsityDetector).

Notice that Julia gives a nice print out of the sparsity pattern.
That's neat, and would be tedious to build by hand!
Notice that Julia gives a nice print out of the sparsity pattern.
That's neat, and would be tedious to build by hand!
Now we just pass it to the `ODEFunction` like as before:

```@example stiff1
Expand Down

0 comments on commit 515a277

Please sign in to comment.