Skip to content

Commit 3a0ac2c

Browse files
committed
add docstring
1 parent 0c30bad commit 3a0ac2c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/systems/abstractsystem.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1386,7 +1386,7 @@ lsys = ModelingToolkit.reorder_states(lsys, states(ssys), desired_order)
13861386
function linearize(sys, lin_fun; t = 0.0, op = Dict(), allow_input_derivatives = false,
13871387
p = DiffEqBase.NullParameters())
13881388
x0 = merge(defaults(sys), op)
1389-
u0, p2, _ = get_u0_p(sys, x0, p; use_union = false, tofloat=true)
1389+
u0, p2, _ = get_u0_p(sys, x0, p; use_union = false, tofloat = true)
13901390

13911391
linres = lin_fun(u0, p2, t)
13921392
f_x, f_z, g_x, g_z, f_u, g_u, h_x, h_z, h_u = linres

src/systems/diffeqs/abstractodesystem.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,11 @@ function ODEFunctionExpr{iip}(sys::AbstractODESystem, dvs = states(sys),
570570
!linenumbers ? striplines(ex) : ex
571571
end
572572

573+
"""
574+
u0, p, defs = get_u0_p(sys, u0map, parammap; tofloat, use_union)
575+
576+
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.
577+
"""
573578
function get_u0_p(sys, u0map, parammap; tofloat, use_union)
574579
eqs = equations(sys)
575580
dvs = states(sys)

0 commit comments

Comments
 (0)