Commit 84076da
Convert LinearFunction to the SciMLFunctionOptions pattern
LinearFunction was the one *Function constructor never converted in the earlier
SciMLFunctionOptions rollout — it read cachesyms/compiler_options out of a raw
kwargs dict via get(kwargs, :key, default) instead of going through the options
struct. Give it the same treatment as the other 12: a kwargs-based wrapper that
builds SciMLFunctionOptions and delegates, plus a public (sys, opts) method
holding the real logic. cachesyms and structural_hint aren't SciMLFunctionOptions
fields (cachesyms is SCCNonlinearFunction-specific plumbing, not a codegen
option) and stay explicit keywords on both methods, mirroring how steady_state
etc. stay explicit on the other *Function constructors.
This is a prerequisite for converting LinearProblem itself to accept
SciMLProblemOptions, since LinearProblem calls LinearFunction as its
`constructor` argument to process_SciMLProblem.
Validated against linearproblem.jl (73 assertions, all passing).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent b1e1c4e commit 84076da
1 file changed
Lines changed: 30 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
| 24 | + | |
24 | 25 | | |
25 | | - | |
26 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
27 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
28 | 49 | | |
29 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
30 | 54 | | |
31 | 55 | | |
32 | 56 | | |
| |||
37 | 61 | | |
38 | 62 | | |
39 | 63 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | 64 | | |
50 | 65 | | |
51 | | - | |
52 | | - | |
53 | | - | |
| 66 | + | |
54 | 67 | | |
55 | | - | |
| 68 | + | |
56 | 69 | | |
57 | 70 | | |
58 | 71 | | |
| |||
0 commit comments