1
1
# CommonSolve.jl: The Common Solve Definition and Interface
2
2
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,
4
4
solver 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
6
6
you must dispatch on one of your own types. That's it. No pirates.
7
7
8
8
## General recommendation
@@ -21,9 +21,16 @@ solve!(::SolverType) :: SolutionType
21
21
```
22
22
23
23
where ` ProblemType ` , ` SolverType ` , and ` SolutionType ` are the types defined in
24
- your package.
24
+ your package.
25
25
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 `
27
34
_ must_ be dispatched on the type defined in your package. For example, do
28
35
_ not_ define a method such as
29
36
@@ -37,6 +44,7 @@ init(::AbstractVector, ::AlgorithmType)
37
44
CommonSolve.init
38
45
CommonSolve.solve
39
46
CommonSolve.solve!
47
+ CommonSolve.step!
40
48
```
41
49
42
50
## Contributing
@@ -83,7 +91,7 @@ Pkg.status(;mode = PKGMODE_MANIFEST) # hide
83
91
</details>
84
92
```
85
93
``` @raw html
86
- You can also download the
94
+ You can also download the
87
95
<a href="
88
96
```
89
97
``` @eval
@@ -104,4 +112,4 @@ link = "https://github.com/SciML/"*name*".jl/tree/gh-pages/v"*version*"/assets/P
104
112
```
105
113
``` @raw html
106
114
">project</a> file.
107
- ```
115
+ ```
0 commit comments