11# CommonSolve.jl: The Common Solve Definition and Interface
22
3- This holds the common ` solve ` , ` init ` , and ` solve !` commands. By using the same definition,
3+ This holds the common ` solve ` , ` init ` , ` solve! ` , and ` step !` commands. By using the same definition,
44solver libraries from other completely different ecosystems can extend the functions and thus
5- not clash with SciML if both ecosystems export the ` solve ` command. The rules are that
5+ not clash with SciML if both ecosystems export the ` solve ` command. The rules are that
66you must dispatch on one of your own types. That's it. No pirates.
77
88## General recommendation
@@ -21,9 +21,16 @@ solve!(::SolverType) :: SolutionType
2121```
2222
2323where ` ProblemType ` , ` SolverType ` , and ` SolutionType ` are the types defined in
24- your package.
24+ your package.
2525
26- To avoid method ambiguity, the first argument of ` solve ` , ` solve! ` , and ` init `
26+ In many cases, the ` SolverType ` is an object that is iteratively progressed to achieve the solution. In such cases, the ` step! ` function can be used:
27+
28+
29+ ``` julia
30+ step! (:: SolverType , args... ; kwargs... )
31+ ```
32+
33+ To avoid method ambiguity, the first argument of ` solve ` , ` solve! ` , ` step! ` , and ` init `
2734_ must_ be dispatched on the type defined in your package. For example, do
2835_ not_ define a method such as
2936
@@ -37,6 +44,7 @@ init(::AbstractVector, ::AlgorithmType)
3744CommonSolve.init
3845CommonSolve.solve
3946CommonSolve.solve!
47+ CommonSolve.step!
4048```
4149
4250## Contributing
@@ -83,7 +91,7 @@ Pkg.status(;mode = PKGMODE_MANIFEST) # hide
8391</details>
8492```
8593``` @raw html
86- You can also download the
94+ You can also download the
8795<a href="
8896```
8997``` @eval
@@ -104,4 +112,4 @@ link = "https://github.com/SciML/"*name*".jl/tree/gh-pages/v"*version*"/assets/P
104112```
105113``` @raw html
106114">project</a> file.
107- ```
115+ ```
0 commit comments