diff --git a/src/DEPENDENCIES b/src/DEPENDENCIES index 8cafde3f4..c184ea213 100644 --- a/src/DEPENDENCIES +++ b/src/DEPENDENCIES @@ -311,6 +311,7 @@ plot.o: output.o plot.o: particle_header.o plot.o: plot_header.o plot.o: ppmlib.o +plot.o: progress_header.o plot.o: source.o plot.o: string.o diff --git a/src/OBJECTS b/src/OBJECTS index c9612e6af..c2a777c4e 100644 --- a/src/OBJECTS +++ b/src/OBJECTS @@ -46,6 +46,7 @@ physics.o \ plot.o \ plot_header.o \ ppmlib.o \ +progress_header.o \ random_lcg.o \ search.o \ set_header.o \ diff --git a/src/plot.F90 b/src/plot.F90 index 0b68f4c21..6252b6c6b 100644 --- a/src/plot.F90 +++ b/src/plot.F90 @@ -10,6 +10,7 @@ module plot use plot_header use ppmlib, only: Image, init_image, allocate_image, & deallocate_image, set_pixel + use progress_header use source, only: initialize_particle use string, only: to_str @@ -108,6 +109,7 @@ contains real(8) :: out_pixel real(8) :: xyz(3) type(Image) :: img + type(ProgressBar) :: progress ! Initialize and allocate space for image call init_image(img) @@ -147,6 +149,7 @@ contains p % coord % universe = BASE_UNIVERSE do y = 1, img % height + call progress % set_value(dble(y)/dble(img % height)*100.) do x = 1, img % width ! get pixel color @@ -226,6 +229,7 @@ contains integer :: id ! id of cell or material real(8) :: vox(3) ! x, y, and z voxel widths real(8) :: ll(3) ! lower left starting point for each sweep direction + type(ProgressBar) :: progress ! compute voxel widths in each direction vox = pl % width/dble(pl % pixels) @@ -251,6 +255,7 @@ contains ll = ll + vox / 2.0 do x = 1, pl % pixels(1) + call progress % set_value(dble(x)/dble(pl % pixels(1))*100.) do y = 1, pl % pixels(2) do z = 1, pl % pixels(3) diff --git a/src/timer_header.F90 b/src/timer_header.F90 index 0dde85d0c..7acef0fc4 100644 --- a/src/timer_header.F90 +++ b/src/timer_header.F90 @@ -45,7 +45,7 @@ contains function timer_get_value(self) result(elapsed) class(Timer), intent(in) :: self ! the timer - real(8) :: elapsed ! total elapsed time + real(8) :: elapsed ! total elapsed time integer :: end_counts ! current number of counts integer :: count_rate ! system-dependent counting rate