Skip to content

Commit 65a6f3e

Browse files
committed
add get_u0_p to docs
1 parent 3a0ac2c commit 65a6f3e

File tree

6 files changed

+7
-3
lines changed

6 files changed

+7
-3
lines changed

docs/src/systems/DiscreteSystem.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ DiscreteSystem
1111
- `get_eqs(sys)` or `equations(sys)`: The equations that define the Discrete System.
1212
- `get_delay_val(sys)`: The delay of the Discrete System.
1313
- `get_iv(sys)`: The independent variable of the Discrete System.
14+
- `get_u0_p(sys, u0map, parammap)` Numeric arrays for the initial condition and parameters given `var => value` maps.
1415

1516
## Transformations
1617

docs/src/systems/NonlinearSystem.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ NonlinearSystem
1111
- `get_eqs(sys)` or `equations(sys)`: The equations that define the nonlinear system.
1212
- `get_states(sys)` or `states(sys)`: The set of states in the nonlinear system.
1313
- `get_ps(sys)` or `parameters(sys)`: The parameters of the nonlinear system.
14+
- `get_u0_p(sys, u0map, parammap)` Numeric arrays for the initial condition and parameters given `var => value` maps.
1415

1516
## Transformations
1617

docs/src/systems/ODESystem.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ ODESystem
1212
- `get_states(sys)` or `states(sys)`: The set of states in the ODE.
1313
- `get_ps(sys)` or `parameters(sys)`: The parameters of the ODE.
1414
- `get_iv(sys)`: The independent variable of the ODE.
15+
- `get_u0_p(sys, u0map, parammap)` Numeric arrays for the initial condition and parameters given `var => value` maps.
1516

1617
## Transformations
1718

src/systems/diffeqs/abstractodesystem.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -571,15 +571,14 @@ function ODEFunctionExpr{iip}(sys::AbstractODESystem, dvs = states(sys),
571571
end
572572

573573
"""
574-
u0, p, defs = get_u0_p(sys, u0map, parammap; tofloat, use_union)
574+
u0, p, defs = get_u0_p(sys, u0map, parammap; use_union=false, tofloat=!use_union)
575575
576576
Take dictionaries with initial conditions and parameters and convert them to numeric arrays `u0` and `p`. Also return the merged dictionary `defs` containing the entire operating point.
577577
"""
578-
function get_u0_p(sys, u0map, parammap; tofloat, use_union)
578+
function get_u0_p(sys, u0map, parammap; use_union = false, tofloat = !use_union)
579579
eqs = equations(sys)
580580
dvs = states(sys)
581581
ps = parameters(sys)
582-
iv = get_iv(sys)
583582

584583
defs = defaults(sys)
585584
defs = mergedefaults(defs, parammap, ps)

src/systems/discrete_system/discrete_system.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,7 @@ function process_DiscreteProblem(constructor, sys::DiscreteSystem, u0map, paramm
418418
linenumbers = true, parallel = SerialForm(),
419419
eval_expression = true,
420420
use_union = false,
421+
tofloat = !use_union,
421422
kwargs...)
422423
eqs = equations(sys)
423424
dvs = states(sys)

src/systems/nonlinear/nonlinearsystem.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@ function process_NonlinearProblem(constructor, sys::NonlinearSystem, u0map, para
320320
linenumbers = true, parallel = SerialForm(),
321321
eval_expression = true,
322322
use_union = false,
323+
tofloat = !use_union,
323324
kwargs...)
324325
eqs = equations(sys)
325326
dvs = states(sys)

0 commit comments

Comments
 (0)