55These are the formal properties that an ` AbstractSciMLOperator ` should obey
66for it to work in the solvers.
77
8- 1 . An ` AbstractSciMLOperator ` represents a linear or nonlinear operator with input/output
9- being ` AbstractArray ` s. Specifically, a SciMLOperator, ` L ` , of size ` (M, N) ` accepts
8+ 1 . An ` AbstractSciMLOperator ` represents a linear or nonlinear operator, with input/output
9+ being ` AbstractArray ` s. Specifically, a SciMLOperator, ` L ` , of size ` (M, N) ` accepts an
1010 input argument ` u ` with leading length ` N ` , i.e. ` size(u, 1) == N ` , and returns an
1111 ` AbstractArray ` of the same dimension with leading length ` M ` , i.e. ` size(L * u, 1) == M ` .
12122 . SciMLOperators can be applied to an ` AbstractArray ` via overloaded ` Base.* ` , or
1313 the in-place ` LinearAlgebra.mul! ` . Additionally, operators are allowed to be time,
1414 or parameter dependent. The state of a SciMLOperator can be updated by calling
15- the mutating function ` update_coefficients!(L, u, p, t) ` where ` p ` representes
15+ the mutating function ` update_coefficients!(L, u, p, t) ` where ` p ` represents
1616 parameters, and ` t ` , time. Calling a SciMLOperator as ` L(du, u, p, t) ` or out-of-place
1717 ` L(u, p, t) ` will automatically update the state of ` L ` before applying it to ` u ` .
1818 ` L(u, p, t) ` is the same operation as ` L(u, p, t) * u ` .
@@ -25,11 +25,11 @@ for it to work in the solvers.
2525## Overloaded Traits
2626
2727Thanks to overloads defined for evaluation methods and traits in
28- ` Base ` , ` LinearAlgebra ` , the behaviour of a ` SciMLOperator ` is
28+ ` Base ` , ` LinearAlgebra ` , the behavior of a ` SciMLOperator ` is
2929indistinguishable from an ` AbstractMatrix ` . These operators can be
3030passed to linear solver packages, and even to ordinary differential
3131equation solvers. The list of overloads to the ` AbstractMatrix `
32- interface include , but are not limited, the following:
32+ interface includes , but is not limited to , the following:
3333
3434- ` Base: size, zero, one, +, -, *, /, \, ∘, inv, adjoint, transpose, convert `
3535- ` LinearAlgebra: mul!, ldiv!, lmul!, rmul!, factorize, issymmetric, ishermitian, isposdef `
@@ -94,13 +94,13 @@ L(u, p, t) != zeros(N) # true
9494The out-of-place evaluation function ` L(u, p, t) ` calls
9595` update_coefficients ` under the hood, which recursively calls
9696the ` update_func ` for each component ` SciMLOperator ` .
97- Therefore the out-of-place evaluation function is equivalent to
97+ Therefore, the out-of-place evaluation function is equivalent to
9898calling ` update_coefficients ` followed by ` Base.* ` . Notice that
9999the out-of-place evaluation does not return the updated operator.
100100
101- On the other hand,, the in-place evaluation function, ` L(v, u, p, t) ` ,
101+ On the other hand, the in-place evaluation function, ` L(v, u, p, t) ` ,
102102mutates ` L ` , and is equivalent to calling ` update_coefficients! `
103- followed by ` mul! ` . The in-place update behaviour works the same way
103+ followed by ` mul! ` . The in-place update behavior works the same way,
104104with a few ` <!> ` s appended here and there. For example,
105105
106106``` julia
@@ -133,11 +133,11 @@ mul!(v, u, p, t) != zero(N) # true
133133L (v, u, p, t) != zero (N) # true
134134```
135135
136- The update behaviour makes this package flexible enough to be used
136+ The update behavior makes this package flexible enough to be used
137137in ` OrdianryDiffEq ` . As the parameter object ` p ` is often reserved
138- for sensitivy computation via automatic-differentiation, a user may
138+ for sensitivity computation via automatic-differentiation, a user may
139139prefer to pass in state information via other arguments. For that
140- reason, we allow for update functions with arbitrary keyword arguments.
140+ reason, we allow update functions with arbitrary keyword arguments.
141141
142142``` julia
143143mat_update_func = (A, u, p, t; scale = 0.0 ) -> scale * (p * p' )
@@ -178,24 +178,24 @@ has_ldiv!
178178
179179## Note About Affine Operators
180180
181- Affine operators are operators which 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
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
183183affine operator. You can only represent an affine operator as a linear operator in a
184184dimension of one larger via the operation: ` [A b] * [u;1] ` , so it would require something modified
185185to the input as well. As such, affine operators are a distinct generalization of linear operators.
186186
187- While it this 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
188188that affine operators can be used in all cases where matrix-free linear solvers are used due to
189- an easy genearlization of the standard convergence proofs. If Q is the affine operator
189+ an easy generalization of the standard convergence proofs. If Q is the affine operator
190190`` Q(x) = Ax + b `` , then solving `` Qx = c `` is equivalent to solving `` Ax + b = c `` or `` Ax = c-b `` .
191- If you know do this same " plug-and-chug" handling of the affine operator in into the GMRES/CG/etc.
191+ If you now do this same “ plug-and-chug” handling of the affine operator into the GMRES/CG/etc.
192192convergence proofs, move the affine part to the rhs residual, and show it converges to solving
193193`` Ax = c-b `` , and thus GMRES/CG/etc. solves `` Q(x) = c `` for an affine operator properly.
194194
195- That same trick then can be used pretty much anywhere you would've had a linear operator to extend
195+ That same trick can be used mostly anywhere you would've had a linear operator to extend
196196the 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- are still compatible with essentially any Krylov method which would otherwise be compatible with
197+ affine as well, and all sorts of things. Thus, affine operators have no matrix representation, but they
198+ are still compatible with essentially any Krylov method, which would otherwise be compatible with
199199matrix-free representations, hence their support in the SciMLOperators interface.
200200
201201## Note about keyword arguments to ` update_coefficients! `
0 commit comments