2022-02-17 20:51:56 +11:00
|
|
|
program essai
|
|
|
|
|
2022-03-18 22:21:40 +11:00
|
|
|
use bloubspace
|
2022-02-17 20:51:56 +11:00
|
|
|
use mathstuff
|
|
|
|
implicit none
|
|
|
|
|
2022-03-18 22:21:40 +11:00
|
|
|
type(t_boundingbox) :: bbox
|
|
|
|
|
|
|
|
call load_boundingbox("WS/boundinboxes.dat", bbox, "cube ")
|
|
|
|
|
|
|
|
print *, bbox
|
|
|
|
|
|
|
|
|
|
|
|
! call test_random(20)
|
|
|
|
|
|
|
|
|
|
|
|
STOP ': BECAUSE JOB IS DONE'
|
|
|
|
|
|
|
|
! --------------------------------------------------------------
|
|
|
|
contains
|
|
|
|
|
|
|
|
subroutine test_random(nbre)
|
|
|
|
integer, intent(in) :: nbre
|
|
|
|
integer :: foo, bar
|
2022-02-17 20:51:56 +11:00
|
|
|
real :: quux
|
2022-02-18 00:10:15 +11:00
|
|
|
double precision :: somme
|
2022-02-17 20:51:56 +11:00
|
|
|
|
2022-03-18 22:21:40 +11:00
|
|
|
call init_random_seed() ! in module 'mathstuff'
|
2022-02-18 00:10:15 +11:00
|
|
|
somme = 0.0
|
2022-03-18 22:21:40 +11:00
|
|
|
do foo=1, nbre
|
2022-02-17 20:51:56 +11:00
|
|
|
quux = rand()
|
2022-02-18 00:10:15 +11:00
|
|
|
somme = somme + quux
|
2022-03-18 22:21:40 +11:00
|
|
|
bar = mod(irand(), 7)
|
|
|
|
print *, foo, quux, somme/foo, bar
|
2022-02-17 20:51:56 +11:00
|
|
|
enddo
|
2022-03-18 22:21:40 +11:00
|
|
|
end subroutine test_random
|
|
|
|
! --------------------------------------------------------------
|
2022-02-17 20:51:56 +11:00
|
|
|
|
2022-03-18 22:21:40 +11:00
|
|
|
end program
|