Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
hersle committed Oct 20, 2024
1 parent 668bffa commit efad630
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/systems/abstractsystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1891,7 +1891,8 @@ function n_expanded_connection_equations(sys::AbstractSystem)
nextras = n_outer_stream_variables + length(ceqs)
end

function Base.show(io::IO, mime::MIME"text/plain", sys::AbstractSystem; hint = true, bold = true)
function Base.show(
io::IO, mime::MIME"text/plain", sys::AbstractSystem; hint = true, bold = true)
limit = get(io, :limit, false) # if output should be limited,
rows = first(displaysize(io)) ÷ 5 # then allocate ≈1/5 of display height to each list

Expand Down Expand Up @@ -1930,7 +1931,8 @@ function Base.show(io::IO, mime::MIME"text/plain", sys::AbstractSystem; hint = t
ntot = neqs + next
ntot > 0 && printstyled(io, "\nEquations ($ntot):"; bold)
neqs > 0 && print(io, "\n $neqs standard", hint ? ": see equations(sys)" : "")
next > 0 && print(io, "\n $next connecting", hint ? ": see equations(expand_connections(sys))" : "")
next > 0 && print(io, "\n $next connecting",
hint ? ": see equations(expand_connections(sys))" : "")
#Base.print_matrix(io, eqs) # usually too long and not useful to print all equations
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 @@ -707,7 +707,8 @@ end

function Base.show(io::IO, mime::MIME"text/plain", sys::ODESystem; hint = true, bold = true)
# Print general AbstractSystem information
invoke(Base.show, Tuple{typeof(io), typeof(mime), AbstractSystem}, io, mime, sys; hint, bold)
invoke(Base.show, Tuple{typeof(io), typeof(mime), AbstractSystem},
io, mime, sys; hint, bold)

# Print initialization equations (unique to ODESystems)
nini = length(initialization_equations(sys))
Expand Down

0 comments on commit efad630

Please sign in to comment.