Skip to content

Commit 58063f1

Browse files
committed
fix overwritten docs
1 parent 1f8297b commit 58063f1

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

src/SciMLOperators.jl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,20 @@ import SparseArrays: sparse, issparse
2020

2121
"""
2222
$(TYPEDEF)
23+
24+
## Interface
25+
26+
An `L::AbstractSciMLOperator` can be called like a function. This behaves
27+
like multiplication by the linear operator represented by the
28+
`AbstractSciMLOperator`. Possible signatures are
29+
30+
- `L(du, u, p, t)` for in-place operator evaluation
31+
- `du = L(u, p, t)` for out-of-place operator evaluation
32+
33+
If the operator is not a constant, update it with `(u, p, t)`.
34+
A mutating form, i.e. `update_coefficients!(L, u, p, t)` that changes the
35+
internal coefficients, and an out-of-place form
36+
`L_new = update_coefficients(L, u, p, t)`.
2337
"""
2438
abstract type AbstractSciMLOperator{T} end
2539

src/interface.jl

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,6 @@
33
# Operator interface
44
###
55

6-
"""
7-
Function call and multiplication:
8-
- L(du, u, p, t) for in-place operator evaluation,
9-
- du = L(u, p, t) for out-of-place operator evaluation
10-
11-
If the operator is not a constant, update it with (u,p,t). A mutating form, i.e.
12-
update_coefficients!(A,u,p,t) that changes the internal coefficients, and a
13-
out-of-place form B = update_coefficients(A,u,p,t).
14-
15-
"""
16-
function (::AbstractSciMLOperator) end
17-
186
DEFAULT_UPDATE_FUNC(A,u,p,t) = A
197

208
update_coefficients(L,u,p,t) = L
@@ -42,7 +30,7 @@ function iscached(L::AbstractSciMLOperator)
4230
has_cache = hasfield(typeof(L), :cache) # TODO - confirm this is static
4331
isset = has_cache ? !isnothing(L.cache) : true
4432

45-
return isset & all(iscached, getops(L))
33+
return isset & all(iscached, getops(L))
4634
end
4735

4836
iscached(L) = true

0 commit comments

Comments
 (0)