Skip to content

Commit

Permalink
Fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
hersle committed Oct 18, 2024
1 parent bfe0b9e commit 5218aca
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 10 deletions.
3 changes: 2 additions & 1 deletion src/systems/abstractsystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2902,7 +2902,8 @@ end
function AbstractTrees.children(sys::AbstractSystem)
ModelingToolkit.get_systems(sys)
end
function AbstractTrees.printnode(io::IO, sys::AbstractSystem; describe = false, bold = false)
function AbstractTrees.printnode(
io::IO, sys::AbstractSystem; describe = false, bold = false)
printstyled(io, nameof(sys); bold)
describe && !isempty(get_description(sys)) && print(io, ": ", get_description(sys))
end
Expand Down
3 changes: 2 additions & 1 deletion src/systems/diffeqs/odesystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,8 @@ function ODESystem(deqs::AbstractVector{<:Equation}, iv, dvs, ps;
end
ODESystem(Threads.atomic_add!(SYSTEM_COUNT, UInt(1)),
deqs, iv′, dvs′, ps′, tspan, var_to_name, ctrl′, observed, tgrad, jac,
ctrl_jac, Wfact, Wfact_t, name, description, systems, defaults, guesses, nothing, initializesystem,
ctrl_jac, Wfact, Wfact_t, name, description, systems,
defaults, guesses, nothing, initializesystem,
initialization_eqs, schedule, connector_type, preface, cont_callbacks,
disc_callbacks, parameter_dependencies,
metadata, gui_metadata, is_dde, checks = checks)
Expand Down
9 changes: 6 additions & 3 deletions src/systems/diffeqs/sdesystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@ struct SDESystem <: AbstractODESystem
end
new(tag, deqs, neqs, iv, dvs, ps, tspan, var_to_name, ctrls, observed, tgrad, jac,
ctrl_jac,
Wfact, Wfact_t, name, description, systems, defaults, connector_type, cevents, devents,
Wfact, Wfact_t, name, description, systems,
defaults, connector_type, cevents, devents,
parameter_dependencies, metadata, gui_metadata, complete, index_cache, parent, is_scalar_noise,
is_dde, isscheduled)
end
Expand Down Expand Up @@ -354,7 +355,8 @@ function stochastic_integral_transform(sys::SDESystem, correction_factor)
end

SDESystem(deqs, get_noiseeqs(sys), get_iv(sys), unknowns(sys), parameters(sys),
name = name, description = get_description(sys), parameter_dependencies = parameter_dependencies(sys), checks = false)
name = name, description = get_description(sys),
parameter_dependencies = parameter_dependencies(sys), checks = false)
end

"""
Expand Down Expand Up @@ -462,7 +464,8 @@ function Girsanov_transform(sys::SDESystem, u; θ0 = 1.0)
# return modified SDE System
SDESystem(deqs, noiseeqs, get_iv(sys), unknown_vars, parameters(sys);
defaults = Dict=> θ0), observed = [weight ~ θ / θ0],
name = name, description = get_description(sys), parameter_dependencies = parameter_dependencies(sys),
name = name, description = get_description(sys),
parameter_dependencies = parameter_dependencies(sys),
checks = false)
end

Expand Down
6 changes: 4 additions & 2 deletions src/systems/jumps/jumpsystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ struct JumpSystem{U <: ArrayPartition} <: AbstractTimeDependentSystem
index_cache::Union{Nothing, IndexCache}
isscheduled::Bool

function JumpSystem{U}(tag, ap::U, iv, unknowns, ps, var_to_name, observed, name, description,
function JumpSystem{U}(
tag, ap::U, iv, unknowns, ps, var_to_name, observed, name, description,
systems,
defaults, connector_type, devents, parameter_dependencies,
metadata = nothing, gui_metadata = nothing,
Expand All @@ -133,7 +134,8 @@ struct JumpSystem{U <: ArrayPartition} <: AbstractTimeDependentSystem
u = __get_unit_type(unknowns, ps, iv)
check_units(u, ap, iv)
end
new{U}(tag, ap, iv, unknowns, ps, var_to_name, observed, name, description, systems, defaults,
new{U}(tag, ap, iv, unknowns, ps, var_to_name,
observed, name, description, systems, defaults,
connector_type, devents, parameter_dependencies, metadata, gui_metadata,
complete, index_cache, isscheduled)
end
Expand Down
6 changes: 4 additions & 2 deletions src/systems/nonlinear/nonlinearsystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ struct NonlinearSystem <: AbstractTimeIndependentSystem
parent::Any
isscheduled::Bool

function NonlinearSystem(tag, eqs, unknowns, ps, var_to_name, observed, jac, name, description,
function NonlinearSystem(
tag, eqs, unknowns, ps, var_to_name, observed, jac, name, description,
systems,
defaults, connector_type, parameter_dependencies = Equation[], metadata = nothing,
gui_metadata = nothing,
Expand All @@ -106,7 +107,8 @@ struct NonlinearSystem <: AbstractTimeIndependentSystem
u = __get_unit_type(unknowns, ps)
check_units(u, eqs)
end
new(tag, eqs, unknowns, ps, var_to_name, observed, jac, name, description, systems, defaults,
new(tag, eqs, unknowns, ps, var_to_name, observed,
jac, name, description, systems, defaults,
connector_type, parameter_dependencies, metadata, gui_metadata, tearing_state,
substitutions, complete, index_cache, parent, isscheduled)
end
Expand Down
3 changes: 2 additions & 1 deletion src/systems/optimization/constraints_system.jl
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ struct ConstraintsSystem <: AbstractTimeIndependentSystem
u = __get_unit_type(unknowns, ps)
check_units(u, constraints)
end
new(tag, constraints, unknowns, ps, var_to_name, observed, jac, name, description, systems,
new(tag, constraints, unknowns, ps, var_to_name,
observed, jac, name, description, systems,
defaults,
connector_type, metadata, tearing_state, substitutions, complete, index_cache)
end
Expand Down

0 comments on commit 5218aca

Please sign in to comment.