Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Added particle information initalization subroutine
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Aug 10, 2021
1 parent ac702ce commit 9514743
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions src/symba/symba_setup.f90
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,41 @@ module subroutine symba_setup_initialize_particle_info(system, param)
! Argumets
class(symba_nbody_system), intent(inout) :: system !! SyMBA nbody system object
class(symba_parameters), intent(inout) :: param !! Current run configuration parameters with SyMBA extensions
! Internals
integer(I4B) :: i

select type(cb => system%cb)
class is (symba_cb)
cb%info%origin_type = "Central body"
cb%info%origin_time = param%t0
cb%info%origin_xh(:) = 0.0_DP
cb%info%origin_vh(:) = 0.0_DP
end select

select type(pl => system%pl)
class is (symba_pl)
do i = 1, pl%nbody
pl%info(i)%origin_type = "Initial conditions"
pl%info(i)%origin_time = param%t0
pl%info(i)%origin_xh(:) = pl%xh(:,i)
pl%info(i)%origin_vh(:) = pl%vh(:,i)
end do
end select

select type(tp => system%tp)
class is (symba_tp)
do i = 1, tp%nbody
tp%info(i)%origin_type = "Initial conditions"
tp%info(i)%origin_time = param%t0
tp%info(i)%origin_xh(:) = tp%xh(:,i)
tp%info(i)%origin_vh(:) = tp%vh(:,i)
end do
end select

return
end subroutine symba_setup_initialize_particle_info


module subroutine symba_setup_initialize_system(self, param)
!! author: David A. Minton
!!
Expand Down

0 comments on commit 9514743

Please sign in to comment.