Skip to content

Commit e61bc6b

Browse files
committed
format
1 parent 2999899 commit e61bc6b

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

src/ModelingToolkit.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,8 @@ export NonlinearSystem, OptimizationSystem, ConstraintsSystem
203203
export alias_elimination, flatten
204204
export connect, domain_connect, @connector, Connection, Flow, Stream, instream
205205
export @component, @mtkmodel, @mtkbuild
206-
export isinput, isoutput, getbounds, hasbounds, getguess, hasguess, isdisturbance, istunable, getdist, hasdist,
206+
export isinput, isoutput, getbounds, hasbounds, getguess, hasguess, isdisturbance,
207+
istunable, getdist, hasdist,
207208
tunable_parameters, isirreducible, getdescription, hasdescription, isbinaryvar,
208209
isintegervar
209210
export ode_order_lowering, dae_order_lowering, liouville_transform

src/systems/nonlinear/initializesys.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,12 @@ function initializesys(sys::ODESystem; name = nameof(sys), kwargs...)
4444
end
4545

4646
pars = parameters(sys)
47-
sys_nl = NonlinearSystem(eqs_ics, sts, pars; defaults = Dict(sts .=> u0), name, kwargs...)
47+
sys_nl = NonlinearSystem(eqs_ics,
48+
sts,
49+
pars;
50+
defaults = Dict(sts .=> u0),
51+
name,
52+
kwargs...)
4853

4954
return sys_nl
5055
end

test/nonlinearsystem.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ end
237237
@testset "Initialization System" begin
238238
# Define the Lotka Volterra system which begins at steady state
239239
@parameters t
240-
pars = @parameters a = 1.5 b = 1.0 c = 3.0 d = 1.0
240+
pars = @parameters a=1.5 b=1.0 c=3.0 d=1.0
241241

242242
vars = @variables begin
243243
dx(t),
@@ -270,8 +270,8 @@ end
270270
@test sol.retcode == SciMLBase.ReturnCode.Success
271271

272272
# Confirm for all the states of the non-simplified system
273-
@test all(.≈(sol[states(sys)], [0,0,0,0]; atol=1e-8))
273+
@test all(.≈(sol[states(sys)], [0, 0, 0, 0]; atol = 1e-8))
274274

275275
# Confirm for all the states of the simplified system
276-
@test all(.≈(sol[states(sys_simple)], [0,0]; atol=1e-8))
276+
@test all(.≈(sol[states(sys_simple)], [0, 0]; atol = 1e-8))
277277
end

0 commit comments

Comments
 (0)