this part need a lot of more work !

This commit is contained in:
tTh
2023-02-11 17:00:58 +01:00
parent 87191666b4
commit 6c9f562c13
13 changed files with 84 additions and 50 deletions

View File

@@ -29,7 +29,7 @@ subroutine compute_barycentre_bodies(astres, bcx, bcy)
integer :: foo
real :: cx, cy
! May be we have to use DOUBLE RPECSION here ?
! May be we have to use DOUBLE PRECSION here ?
cx = 0.0
cy = 0.0
do foo=1, ubound(astres, 1)
@@ -40,12 +40,13 @@ subroutine compute_barycentre_bodies(astres, bcx, bcy)
bcy = cy / real(ubound(astres, 1))
end subroutine
!-----------------------------------------------------------------------
subroutine print_barycentre_bodies(astres)
subroutine print_barycentre_bodies(astres, title)
type(massbody), intent(in) :: astres(:)
real :: cx, cy
character(len=*), intent(in) :: title
real :: cx, cy
call compute_barycentre_bodies(astres, cx, cy)
print *, "barycentre : ", cx, cy
print *, "barycentre {", title, "} ", cx, cy
end subroutine
!-----------------------------------------------------------------------
@@ -81,8 +82,8 @@ subroutine create_some_planets(planets, coef, sx, sy)
!-
planets(foo)%posx = rand() * real(sx-1)
planets(foo)%posy = rand() * real(sy-1)
planets(foo)%mass = 7e6 + coef*foo
planets(foo)%heading = 2 * 3.14159 * rand()
planets(foo)%mass = 7.12e6 + coef*foo
planets(foo)%heading = 2 * 3.141592654 * rand()
if (rand() .LT. 0.15) planets(foo)%speed = 3.14159
planets(foo)%serial = foo*2 + 120
endif