Skip to content

Commit b18b92f

Browse files
committed
update the docs
1 parent 343f662 commit b18b92f

File tree

4 files changed

+27
-13
lines changed

4 files changed

+27
-13
lines changed

src/SciMLBase.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ abstract type ADOriginator end
642642
"""
643643
$(TYPEDEF)
644644
645-
Used to specify which elements can be aliased in a solve.
645+
Used to specify which variables can be aliased in a solve.
646646
Every concrete AbstractAliasSpecifier should have at least the fields `alias_p` and `alias_f`.
647647
"""
648648
abstract type AbstractAliasSpecifier end

src/problems/linear_problems.jl

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,20 +77,23 @@ 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-
"""
8580
struct LinearAliasSpecifier <: AbstractAliasSpecifier
8681
alias_p::Union{Bool,Nothing}
8782
alias_f::Union{Bool,Nothing}
8883
alias_A::Union{Bool,Nothing}
8984
alias_b::Union{Bool,Nothing}
9085
end
9186

92-
"""
93-
LinearAliasSpecifier(;alias_A = nothing, alias_b = nothing)
87+
@doc doc"""
88+
Holds information on what variables to alias when solving a `LinearProblem`
89+
90+
### Keywords
91+
92+
* `alias_p::Bool`
93+
* `alias_f::Bool`
94+
* `alias_A::Bool`: alias the `A` array.
95+
* `alias_b::Bool`: alias the `b` array.
96+
* `alias::Bool`: sets all fields of the `LinearAliasSpecifier` to `alias`.
9497
9598
Creates a `LinearAliasSpecifier` where `alias_A` and `alias_b` default to `nothing`.
9699
When `alias_A` or `alias_b` is nothing, the default value of the solver is used.

src/problems/nonlinear_problems.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,17 @@ struct NonlinearAliasSpecifier <: AbstractAliasSpecifier
557557
alias_u0::Union{Bool,Nothing}
558558
end
559559

560+
@doc doc"""
561+
Holds information on what variables to alias when solving a `NonlinearProblem`.
562+
563+
### Keywords
564+
565+
* `alias_p::Bool`
566+
* `alias_f::Bool`
567+
* `alias_A::Bool`: alias the `A` array.
568+
* `alias_b::Bool`: alias the `b` array.
569+
* `alias::Bool`: sets all fields of the `LinearAliasSpecifier` to `alias`.
570+
"""
560571
function NonlinearAliasSpecifier(;alias_p = nothing, alias_f = nothing, alias_u0 = nothing, alias = nothing)
561572
if isnothing(alias)
562573
NonlinearAliasSpecifier(alias_p, alias_f, alias_u0)

src/problems/ode_problems.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -530,13 +530,13 @@ when solving an ODE. Conforms to the AbstractAliasSpecifier interface.
530530
### Keywords
531531
* `alias_p::Bool`
532532
* `alias_f::Bool`
533-
* `alias_u0::Bool = false`: alias the u0 array
534-
* `alias_du0::Bool = false`: alias the du0 array for DAEs
535-
* `alias_tstops::Bool = false`: alias the tstops array
536-
* `alias::Bool`: sets all fields to `alias`
533+
* `alias_u0::Bool`: alias the u0 array. Defaults to false .
534+
* `alias_du0::Bool`: alias the du0 array for DAEs. Defaults to false.
535+
* `alias_tstops::Bool`: alias the tstops array
536+
* `alias::Bool`: sets all fields of the `ODEAliasSpecifier` to `alias`
537537
538538
"""
539-
function ODEAliasSpecifier(;alias_p = nothing, alias_f = nothing, alias_u0 = false, alias_du0 = false, alias_tstops = false, alias = nothing)
539+
function ODEAliasSpecifier(;alias_p = nothing, alias_f = nothing, alias_u0 = nothing, alias_du0 = nothing, alias_tstops = nothing, alias = nothing)
540540
if alias == true
541541
ODEAliasSpecifier(true,true,true,true,true)
542542
elseif alias == false

0 commit comments

Comments
 (0)