bloubworld: cleaning
This commit is contained in:
parent
5030fda56f
commit
f9a93bf6f4
@ -107,8 +107,8 @@ module bloubspace
|
||||
integer :: errcode, output, foo, spitted
|
||||
character(200) :: chaine
|
||||
|
||||
write (0, '(" spitting", (I6), " bloubs to ", (A), " file")') &
|
||||
towrite, trim(fname)
|
||||
! write (0, '(" spitting", (I6), " bloubs to ", (A), " file")') &
|
||||
! towrite, trim(fname)
|
||||
|
||||
open( newunit=output, &
|
||||
file=trim(fname), form='unformatted', &
|
||||
@ -131,7 +131,8 @@ module bloubspace
|
||||
enddo
|
||||
|
||||
close(output)
|
||||
write(0, '(1X, "spitted ", I0, " bloubs.")') spitted
|
||||
write(0, '(1X, "spitted ", I0, " bloubs to .", A)') &
|
||||
spitted, trim(fname)
|
||||
|
||||
end subroutine spit_bloubs_to_file
|
||||
! ----------------------------------------------------------------
|
||||
@ -233,40 +234,47 @@ module bloubspace
|
||||
real, parameter :: SH = 6.0
|
||||
real, parameter :: SV = 4.0
|
||||
|
||||
logical :: flag
|
||||
|
||||
flag = .FALSE.
|
||||
|
||||
! X axis
|
||||
if ((blb%px + blb%radius) .GT. SH) then
|
||||
blb%vx = -1.0 * blb%vx
|
||||
blb%px = SH - blb%radius
|
||||
blb%age = blb%age + 1
|
||||
endif
|
||||
if ((blb%px - blb%radius) .LT. -SH) then
|
||||
blb%vx = -1.0 * blb%vx
|
||||
blb%px = -SH + blb%radius
|
||||
blb%age = blb%age + 1
|
||||
flag = .TRUE.
|
||||
endif
|
||||
|
||||
! vertical axe Y
|
||||
if ((blb%py - blb%radius) .LT. -SV) then
|
||||
blb%vy = -1.0 * blb%vy
|
||||
blb%py = -SV + blb%radius
|
||||
blb%age = blb%age + 1
|
||||
flag = .TRUE.
|
||||
endif
|
||||
if ((blb%py + blb%radius) .GT. SV) then ! overshoot ?
|
||||
blb%vy = -1.0 * blb%vy
|
||||
blb%age = blb%age + 1
|
||||
blb%py = SV - blb%radius
|
||||
flag = .TRUE.
|
||||
endif
|
||||
|
||||
! Z axis
|
||||
if ((blb%pz + blb%radius) .GT. SH) then
|
||||
blb%vz = -1.0 * blb%vz
|
||||
blb%age = blb%age + 1
|
||||
blb%pz = SH - blb%radius
|
||||
flag = .TRUE.
|
||||
endif
|
||||
if ((blb%pz + blb%radius) .LT. -SH) then
|
||||
blb%vz = -1.0 * blb%vz
|
||||
blb%age = blb%age + 1
|
||||
blb%pz = -SH + blb%radius
|
||||
flag = .TRUE.
|
||||
endif
|
||||
|
||||
if (flag) then
|
||||
blb%age = blb%age + 1
|
||||
endif
|
||||
|
||||
end subroutine
|
||||
|
Loading…
Reference in New Issue
Block a user