Skip to content

Commit a083c82

Browse files
committed
displaysize
1 parent d7b7d0d commit a083c82

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/dynamicalsystem/dynamicalsystem.jl

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -257,13 +257,16 @@ paramname(p) = nameof(typeof(p))
257257
function Base.show(io::IO, ds::DS)
258258
ps = 14
259259
text = summary(ds)
260-
print(io, text*"\n",
261-
rpad(" state: ", ps)*"$(get_state(ds))\n",
262-
rpad(" e.o.m.: ", ps)*"$(eomstring(ds.f))\n",
263-
rpad(" in-place? ", ps)*"$(isinplace(ds))\n",
264-
rpad(" jacobian: ", ps)*"$(jacobianstring(ds))\n",
265-
rpad(" parameters: ", ps)*"$(paramname(ds.p))"
266-
)
260+
u0 = get_state(ds)
261+
262+
ctx = IOContext(io, :limit => true, :compact => true, :displaysize => (10,50))
263+
264+
print(io, text*"\n")
265+
println(ctx, rpad(" state: ", ps), get_state(ds))
266+
println(io, rpad(" e.o.m.: ", ps), eomstring(ds.f))
267+
println(io, rpad(" in-place? ", ps), isinplace(ds))
268+
println(io, rpad(" jacobian: ", ps), jacobianstring(ds)),
269+
print(io, rpad(" parameters: ", ps), paramname(ds.p))
267270
end
268271

269272
#######################################################################################

0 commit comments

Comments
 (0)