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
[](https://github.com/SciML/ColPrac)
11
+
[](https://github.com/SciML/ColPrac)
M =MatrixOperator(zero(N, N); update_func = mat_update_func,
146
-
accepted_kwargs = (:state,))
146
+
accepted_kwargs = (:state,))
147
147
148
148
M(u, p, t) ==zeros(N) # true
149
149
M(u, p, t; scale =1.0) !=zero(N)
@@ -179,22 +179,22 @@ has_ldiv!
179
179
## Note About Affine Operators
180
180
181
181
Affine operators are operators that have the action `Q*x = A*x + b`. These operators have
182
-
no matrix representation, since if there was, it would be a linear operator instead of an
183
-
affine operator. You can only represent an affine operator as a linear operator in a
184
-
dimension of one larger via the operation: `[A b] * [u;1]`, so it would require something modified
182
+
no matrix representation, since if there was, it would be a linear operator instead of an
183
+
affine operator. You can only represent an affine operator as a linear operator in a
184
+
dimension of one larger via the operation: `[A b] * [u;1]`, so it would require something modified
185
185
to the input as well. As such, affine operators are a distinct generalization of linear operators.
186
186
187
-
While it seems like it might doom the idea of using matrix-free affine operators, it turns out
187
+
While it seems like it might doom the idea of using matrix-free affine operators, it turns out
188
188
that affine operators can be used in all cases where matrix-free linear solvers are used due to
189
-
an easy generalization of the standard convergence proofs. If Q is the affine operator
190
-
``Q(x) = Ax + b``, then solving ``Qx = c`` is equivalent to solving ``Ax + b = c`` or ``Ax = c-b``.
191
-
If you now do this same “plug-and-chug” handling of the affine operator into the GMRES/CG/etc.
192
-
convergence proofs, move the affine part to the rhs residual, and show it converges to solving
193
-
``Ax = c-b``, and thus GMRES/CG/etc. solves ``Q(x) = c`` for an affine operator properly.
194
-
195
-
That same trick can be used mostly anywhere you would've had a linear operator to extend
196
-
the proof to affine operators, so then ``exp(A*t)*v`` operations via Krylov methods work for A being
197
-
affine as well, and all sorts of things. Thus, affine operators have no matrix representation, but they
189
+
an easy generalization of the standard convergence proofs. If Q is the affine operator
190
+
``Q(x) = Ax + b``, then solving ``Qx = c`` is equivalent to solving ``Ax + b = c`` or ``Ax = c-b``.
191
+
If you now do this same “plug-and-chug” handling of the affine operator into the GMRES/CG/etc.
192
+
convergence proofs, move the affine part to the rhs residual, and show it converges to solving
193
+
``Ax = c-b``, and thus GMRES/CG/etc. solves ``Q(x) = c`` for an affine operator properly.
194
+
195
+
That same trick can be used mostly anywhere you would've had a linear operator to extend
196
+
the proof to affine operators, so then ``exp(A*t)*v`` operations via Krylov methods work for A being
197
+
affine as well, and all sorts of things. Thus, affine operators have no matrix representation, but they
198
198
are still compatible with essentially any Krylov method, which would otherwise be compatible with
199
199
matrix-free representations, hence their support in the SciMLOperators interface.
200
200
@@ -206,14 +206,16 @@ state through arbitrary keyword arguments to `update_coefficients!`. When the ca
206
206
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).
207
207
208
208
In the below example, we create an operator that gleefully ignores `u`, `p`, and `t` and uses its own special scaling.
209
+
209
210
```@example
210
211
using SciMLOperators
211
212
212
-
γ = ScalarOperator(0.0; update_func=(a, u, p, t; my_special_scaling) -> my_special_scaling,
213
-
accepted_kwargs=(:my_special_scaling,))
213
+
γ = ScalarOperator(0.0;
214
+
update_func = (a, u, p, t; my_special_scaling) -> my_special_scaling,
@@ -58,10 +59,11 @@ We provide below a list of packages that make use of `SciMLOperators`.
58
59
If you are using `SciMLOperators` in your work, feel free to create a PR
59
60
and add your package to this list.
60
61
61
-
*[`SciML.ai`](https://sciml.ai/) ecosystem: `SciMLOperators` is compatible with, and utilized by every `SciML` package.
62
-
*[`CalculustJL`](https://github.com/CalculustJL) packages use `SciMLOperators` to define matrix-free vector-calculus operators for solving partial differential equations.
-[`SciML.ai`](https://sciml.ai/) ecosystem: `SciMLOperators` is compatible with, and utilized by every `SciML` package.
67
63
64
+
-[`CalculustJL`](https://github.com/CalculustJL) packages use `SciMLOperators` to define matrix-free vector-calculus operators for solving partial differential equations.
0 commit comments