2024-02-07 03:03:00 +11:00
|
|
|
program listbloubs
|
2022-03-18 22:21:40 +11:00
|
|
|
|
|
|
|
use bloubspace
|
|
|
|
implicit none
|
|
|
|
|
2022-03-21 00:25:05 +11:00
|
|
|
integer, parameter :: NB_MAX_BLOUBS = 2000000
|
2022-03-18 22:21:40 +11:00
|
|
|
|
|
|
|
! --------------------------------------------------------------
|
2022-03-21 00:25:05 +11:00
|
|
|
character(300) :: infile
|
2022-03-18 22:21:40 +11:00
|
|
|
integer :: errcode, i
|
|
|
|
integer :: nbgot
|
|
|
|
type(t_bloubs), dimension(:), allocatable :: bloubs
|
|
|
|
|
|
|
|
i = IARGC()
|
|
|
|
if (i .ne. 1) then
|
|
|
|
STOP ": BAD ARG ON COMMAND LINE"
|
|
|
|
endif
|
|
|
|
call getarg(1, infile)
|
|
|
|
|
|
|
|
write (0, '(A)') &
|
2022-10-29 06:53:57 +11:00
|
|
|
"***** listing bloubs from "//trim(infile)
|
2022-03-18 22:21:40 +11:00
|
|
|
|
|
|
|
allocate (bloubs(NB_MAX_BLOUBS), stat=errcode)
|
|
|
|
if (0 .NE. errcode) then
|
|
|
|
STOP " : NO ENOUGH MEMORY"
|
|
|
|
endif
|
2022-10-29 06:53:57 +11:00
|
|
|
! run a molly-guard
|
2022-03-18 22:21:40 +11:00
|
|
|
do i = 1, NB_MAX_BLOUBS
|
|
|
|
bloubs(i)%alive = .FALSE.
|
|
|
|
enddo
|
|
|
|
|
|
|
|
call slurp_bloubs_file_in_array(trim(infile), bloubs, nbgot)
|
|
|
|
write(0, '(A,I6,1X,A)') "slurped ", nbgot, "bloubs"
|
|
|
|
|
2022-10-29 06:53:57 +11:00
|
|
|
do i=1, nbgot
|
2024-02-07 03:03:00 +11:00
|
|
|
write(6, '(A8, 1X, 1L, 1X, I2, 1X, F8.3, 1X, 3F8.3, 1X, 3F8.3, 1X, 2I4)') &
|
2022-03-18 22:21:40 +11:00
|
|
|
bloubs(i)%nick, bloubs(i)%alive, &
|
|
|
|
bloubs(i)%state, &
|
|
|
|
bloubs(i)%radius, &
|
|
|
|
bloubs(i)%px, bloubs(i)%py, bloubs(i)%pz, &
|
2022-03-21 00:25:05 +11:00
|
|
|
bloubs(i)%vx, bloubs(i)%vy, bloubs(i)%vz, &
|
2024-02-07 03:03:00 +11:00
|
|
|
bloubs(i)%age, bloubs(i)%agemax
|
2022-03-18 22:21:40 +11:00
|
|
|
enddo
|
|
|
|
|
|
|
|
end program
|
|
|
|
|
|
|
|
! \o_
|