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