Skip to content

Commit a3f572a

Browse files
committed
add docs
1 parent 263f1e1 commit a3f572a

File tree

3 files changed

+24
-2
lines changed

3 files changed

+24
-2
lines changed

docs/src/interfaces/Common_Keywords.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ Note that if a method does not have adaptivity, the following rules apply:
101101

102102
## Memory Optimizations
103103

104-
- `alias_u0`: allows the solver to alias the initial condition array that is contained
105-
in the problem struct. Defaults to false.
104+
- `alias`: an `ODEAliases` object that holds the field `alias_u0`, which allows the solver to alias the
105+
initial condition array that is contained in the problem struct. Defaults to false.
106106
- `cache`: pass a solver cache to decrease the construction time. This is not implemented
107107
for any of the problem interfaces at this moment.
108108

src/problems/linear_problems.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,22 @@ function LinearProblem(A, b, args...; kwargs...)
7777
end
7878
end
7979

80+
@doc doc"""
81+
82+
Holds `alias_A` and `alias_b` which determine whether
83+
to alias `A` and `b` when solving a `LinearProblem`.
84+
"""
8085
struct LinearAliases <: AbstractAliasSpecifier
8186
alias_A::Union{Bool,Nothing}
8287
alias_b::Union{Bool,Nothing}
8388
end
8489

90+
"""
91+
LinearAliases(;alias_A = nothing, alias_b = nothing)
92+
93+
Creates a `LinearAliases` where `alias_A` and `alias_b` default to `nothing`.
94+
When `alias_A` or `alias_b` is nothing, the default value of the solver is used.
95+
"""
8596
function LinearAliases(;alias_A = nothing, alias_b = nothing)
8697
LinearAliases(alias_A, alias_b)
8798
end

src/problems/ode_problems.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,11 +512,22 @@ function IncrementingODEProblem{iip}(f::IncrementingODEFunction, u0, tspan,
512512
ODEProblem(f, u0, tspan, p, IncrementingODEProblem{iip}(); kwargs...)
513513
end
514514

515+
@doc doc"""
515516
517+
Holds information on what variables to alias
518+
when solving an ODE. The field `alias_u0` determines whether the initial condition
519+
will be aliased when the ODE is solved.
520+
"""
516521
struct ODEAliases <: AbstractAliasSpecifier
517522
alias_u0::Union{Bool,Nothing}
518523
end
519524

525+
"""
526+
ODEAliases(;alias_u0 = nothing)
527+
528+
Creates an `ODEAliases`, with a default `alias_u0` value of `nothing`.
529+
When `alias_u0` is `nothing`, the solvers default to not aliasing `u0`.
530+
"""
520531
function ODEAliases(;alias_u0 = nothing)
521532
ODEAliases(alias_u0)
522533
end

0 commit comments

Comments
 (0)