From cb05e7a85ed61114df74f5bf5d573fca7baf58a5 Mon Sep 17 00:00:00 2001 From: Arno Strouwen Date: Tue, 3 Jan 2023 04:33:34 +0100 Subject: [PATCH 1/4] start fixing LinearProblem docstring --- src/problems/basic_problems.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/problems/basic_problems.jl b/src/problems/basic_problems.jl index 443ec8018..757e66945 100644 --- a/src/problems/basic_problems.jl +++ b/src/problems/basic_problems.jl @@ -32,8 +32,8 @@ Optionally, an initial guess ``u₀`` can be supplied which is used for iterativ methods. ```julia -LinearProblem{isinplace}(A,x,p=NullParameters();u0=nothing,kwargs...) -LinearProblem(f::AbstractDiffEqOperator,u0,p=NullParameters();u0=nothing,kwargs...) +LinearProblem(A::AbstractMatrix,b::AbstractVector;u0=nothing,kwargs...) +LinearProblem{isinplace}(f::AbstractSciMLOperator,u0,p=NullParameters();u0=nothing,kwargs...) ``` `isinplace` optionally sets whether the function is in-place or not, i.e. whether From 7556215cc7100a1a578309199f264d64f8e32f63 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Tue, 3 Jan 2023 13:04:23 -0500 Subject: [PATCH 2/4] Update src/problems/basic_problems.jl --- src/problems/basic_problems.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/problems/basic_problems.jl b/src/problems/basic_problems.jl index 757e66945..1bd46012a 100644 --- a/src/problems/basic_problems.jl +++ b/src/problems/basic_problems.jl @@ -33,7 +33,7 @@ methods. ```julia LinearProblem(A::AbstractMatrix,b::AbstractVector;u0=nothing,kwargs...) -LinearProblem{isinplace}(f::AbstractSciMLOperator,u0,p=NullParameters();u0=nothing,kwargs...) +LinearProblem{isinplace}(f::AbstractSciMLOperator,b,p=NullParameters();u0=nothing,kwargs...) ``` `isinplace` optionally sets whether the function is in-place or not, i.e. whether From f423047005b6f35b3a0ff0677b2d1e512e316fc3 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Tue, 3 Jan 2023 13:05:08 -0500 Subject: [PATCH 3/4] Update src/problems/basic_problems.jl --- src/problems/basic_problems.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/problems/basic_problems.jl b/src/problems/basic_problems.jl index 1bd46012a..c471c2e12 100644 --- a/src/problems/basic_problems.jl +++ b/src/problems/basic_problems.jl @@ -32,7 +32,7 @@ Optionally, an initial guess ``u₀`` can be supplied which is used for iterativ methods. ```julia -LinearProblem(A::AbstractMatrix,b::AbstractVector;u0=nothing,kwargs...) +LinearProblem(A,b;u0=nothing,kwargs...) LinearProblem{isinplace}(f::AbstractSciMLOperator,b,p=NullParameters();u0=nothing,kwargs...) ``` From 6de98907e973e74fb879daf8b15cad6ba863100f Mon Sep 17 00:00:00 2001 From: Arno Strouwen Date: Tue, 3 Jan 2023 23:33:48 +0100 Subject: [PATCH 4/4] LinearProblem docstring --- src/problems/basic_problems.jl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/problems/basic_problems.jl b/src/problems/basic_problems.jl index c471c2e12..d5315fcbe 100644 --- a/src/problems/basic_problems.jl +++ b/src/problems/basic_problems.jl @@ -18,7 +18,7 @@ Au = b For matrix-free versions, the specification of the problem is given by an operator `A(u,p,t)` which computes `A*u`, or in-place as `A(du,u,p,t)`. These -are specified via the `AbstractSciMLOperator` interface. For more details, see +are specified via the `AbstractDiffEqOperator` interface. For more details, see the [SciMLBase Documentation](https://docs.sciml.ai/SciMLBase/stable/). Note that matrix-free versions of LinearProblem definitions are not compatible @@ -32,13 +32,13 @@ Optionally, an initial guess ``u₀`` can be supplied which is used for iterativ methods. ```julia -LinearProblem(A,b;u0=nothing,kwargs...) -LinearProblem{isinplace}(f::AbstractSciMLOperator,b,p=NullParameters();u0=nothing,kwargs...) +LinearProblem(A,b,p=NullParameters();u0=nothing,kwargs...) +LinearProblem{isinplace}(f::AbstractDiffEqOperator,b,p=NullParameters();u0=nothing,kwargs...) ``` `isinplace` optionally sets whether the function is in-place or not, i.e. whether the solvers are allowed to mutate. By default this is true for `AbstractMatrix`, -and for `AbstractSciMLOperator`s it matches the choice of the operator definition. +and for `AbstractDiffEqOperator`s it matches the choice of the operator definition. Parameters are optional, and if not given, then a `NullParameters()` singleton will be used, which will throw nice errors if you try to index non-existent @@ -48,7 +48,7 @@ parameters. Any extra keyword arguments are passed on to the solvers. * `A`: The representation of the linear operator. * `b`: The right-hand side of the linear system. -* `p`: The parameters for the problem. Defaults to `NullParameters`. Currently unused. +* `p`: The parameters for the problem. Defaults to `NullParameters`. * `u0`: The initial condition used by iterative solvers. * `kwargs`: The keyword arguments passed on to the solvers. """