You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/interface.md
+23Lines changed: 23 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,3 +55,26 @@ the proof to affine operators, so then ``exp(A*t)*v`` operations via Krylov meth
55
55
affine as well, and all sorts of things. Thus affine operators have no matrix representation but they
56
56
are still compatible with essentially any Krylov method which would otherwise be compatible with
57
57
matrix-free representations, hence their support in the SciMLOperators interface.
58
+
59
+
## Note about keyword arguments to `update_coefficients!`
60
+
61
+
In rare cases, an operator may be used in a context where additional state is expected to be provided
62
+
to `update_coefficients!` beyond `u`, `p`, and `t`. In this case, the operator may accept this additional
63
+
state through arbitrary keyword arguments to `update_coefficients!`. When the caller provides these, they will be recursively propagated downwards through composed operators just like `u`, `p`, and `t`, and provided to the operator.
64
+
For the [premade SciMLOperators](premade_operators.md), one can specify the keyword arguments used by an operator with an `accepted_kwargs` argument (by default, none are passed).
65
+
66
+
In the below example, we create an operator that gleefully ignores `u`, `p`, and `t` and uses its own special scaling.
67
+
```@example
68
+
using SciMLOperators
69
+
70
+
γ = ScalarOperator(0.0; update_func=(a, u, p, t; my_special_scaling) -> my_special_scaling,
0 commit comments