2022-02-07 09:45:08 +11:00
|
|
|
program genbloubs
|
|
|
|
|
|
|
|
use bloubspace
|
|
|
|
|
|
|
|
integer :: nbbloubs
|
|
|
|
integer :: i
|
|
|
|
character(200) :: filename
|
|
|
|
character(30) :: str
|
|
|
|
type(t_bloubs) :: bloub
|
2022-02-08 23:25:56 +11:00
|
|
|
integer :: idu
|
2022-02-07 09:45:08 +11:00
|
|
|
|
|
|
|
i = IARGC()
|
|
|
|
if (i .ne. 2) then
|
|
|
|
STOP ": BAD ARGS ON COMMAND LINE"
|
|
|
|
endif
|
|
|
|
|
|
|
|
call getarg(1, filename)
|
|
|
|
call getarg(2, str)
|
|
|
|
read(str,*) nbbloubs
|
|
|
|
|
2022-03-18 22:21:40 +11:00
|
|
|
write (0, '(A,I8,A)') &
|
2022-02-07 09:45:08 +11:00
|
|
|
"*** generating ", nbbloubs, " bloubs to "//trim(filename)
|
|
|
|
|
2022-03-23 02:21:36 +11:00
|
|
|
call init_random_seed()
|
|
|
|
|
2022-03-18 22:21:40 +11:00
|
|
|
open(newunit=idu, file=trim(filename), &
|
|
|
|
form='unformatted', &
|
|
|
|
access="sequential", &
|
2022-02-07 09:45:08 +11:00
|
|
|
action='write', status='replace')
|
|
|
|
|
|
|
|
do i = 1, nbbloubs
|
2022-02-08 23:25:56 +11:00
|
|
|
|
2022-02-17 01:59:42 +11:00
|
|
|
bloub%nick = 'noname '
|
|
|
|
bloub%num = i + 41
|
2022-02-07 09:45:08 +11:00
|
|
|
call random_pv(bloub)
|
2022-03-18 22:21:40 +11:00
|
|
|
bloub%radius = 0.035 + (0.03*rand())
|
2022-02-07 09:45:08 +11:00
|
|
|
|
|
|
|
write(idu) bloub ! no error control ?
|
|
|
|
|
|
|
|
end do
|
|
|
|
|
|
|
|
close(unit=idu)
|
|
|
|
|
|
|
|
end program
|