tWrite progress during irregular packing on single line - Granular.jl - Julia p… | |
git clone git://src.adamsgaard.dk/Granular.jl | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 1066430542dfb0b2ec929f5c712adc581e3d0c46 | |
parent 51548bc05e078362d88c14e5e9f32624fcc1a31e | |
Author: Anders Damsgaard <[email protected]> | |
Date: Thu, 3 May 2018 15:23:53 -0400 | |
Write progress during irregular packing on single line | |
Diffstat: | |
M src/packing.jl | 7 +++++-- | |
1 file changed, 5 insertions(+), 2 deletions(-) | |
--- | |
diff --git a/src/packing.jl b/src/packing.jl | |
t@@ -228,6 +228,9 @@ function irregularPacking!(simulation::Simulation; | |
n = 0 | |
neighbor_found = false | |
i_last_active = 0 | |
+ if verbose | |
+ println("") | |
+ end | |
while !isempty(active_list) | |
t@@ -332,7 +335,7 @@ function irregularPacking!(simulation::Simulation; | |
end | |
end | |
if verbose | |
- println("Active points: $(length(active_list))") | |
+ print("\rActive points: $(length(active_list))") | |
#println(active_list) | |
end | |
t@@ -349,7 +352,7 @@ function irregularPacking!(simulation::Simulation; | |
end # end while !isempty(active_list) | |
if verbose | |
- Compat.@info "Generated $(length(simulation.grains) - np_init) points" | |
+ Compat.@info "\nGenerated $(length(simulation.grains) - np_init) point… | |
end | |
end | |