Skip to content

Commit d68112f

Browse files
Merge pull request #121 from vpuri3/patch-4
Update custom.md
2 parents 679969a + 74f2e75 commit d68112f

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

docs/src/advanced/custom.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function my_linsolve(A,b,u,p,newA,Pl,Pr,solverdata;verbose=true, kwargs...)
1818
end
1919

2020
prob = LinearProblem(Diagonal(rand(4)), rand(4))
21-
alg = LinearSolveFunction(my_linsolve),
21+
alg = LinearSolveFunction(my_linsolve)
2222
sol = solve(prob, alg)
2323
```
2424
The inputs to the function are as follows:
@@ -30,8 +30,8 @@ The inputs to the function are as follows:
3030
- `Pl`, left-preconditioner
3131
- `Pr`, right-preconditioner
3232
- `solverdata`, solver cache set to `nothing` if solver hasn't been initialized
33-
- `kwargs`, standard SciML keyword arguments such as `verbose`, `maxiters`,
34-
`abstol`, `reltol`
33+
- `kwargs`, standard SciML keyword arguments such as `verbose`, `maxiters`, `abstol`, `reltol`
34+
3535
The function `my_linsolve` must accept the above specified arguments, and return
3636
the solution, `u`. As memory for `u` is already allocated, the user may choose
3737
to modify `u` in place as follows:
@@ -47,9 +47,3 @@ end
4747
alg = LinearSolveFunction(my_linsolve!)
4848
sol = solve(prob, alg)
4949
```
50-
Finally, note that `LinearSolveFunction()` dispatches to the default linear solve
51-
algorithm handling if no arguments are passed in.
52-
```julia
53-
alg = LinearSolveFunction()
54-
sol = solve(prob, alg) # same as solve(prob, nothing)
55-
```

0 commit comments

Comments
 (0)