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

Commit

Permalink
Fixed some issue involving uninitialized variables
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Oct 13, 2021
1 parent a078373 commit c3ef158
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/discard/discard.f90
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ module subroutine discard_tp(self, system, param)
integer(I4B) :: npl, ntp

associate(tp => self, cb => system%cb, pl => system%pl)
if ((ntp == 0) .or. (npl ==0)) return
ntp = tp%nbody
npl = pl%nbody
if ((ntp == 0) .or. (npl ==0)) return

if ((param%rmin >= 0.0_DP) .or. (param%rmax >= 0.0_DP) .or. &
(param%rmaxu >= 0.0_DP) .or. ((param%qmin >= 0.0_DP) .and. (param%qmin_coord == "BARY"))) then
Expand Down
6 changes: 4 additions & 2 deletions src/symba/symba_encounter_check.f90
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ module function symba_encounter_check_pl(self, param, system, dt, irec) result(l
type(interaction_timer), save :: itimer
logical, save :: lfirst = .true.
type(walltimer) :: timer


lany_encounter = .false.
if (self%nbody == 0) return

associate(pl => self, plplenc_list => system%plplenc_list)
Expand Down Expand Up @@ -200,7 +201,8 @@ module function symba_encounter_check_tp(self, param, system, dt, irec) result(l
real(DP) :: rshell_irec
logical, dimension(:), allocatable :: lvdotr
integer(I4B), dimension(:), allocatable :: index1, index2


lany_encounter = .false.
if (self%nbody == 0) return

associate(tp => self, ntp => self%nbody, pl => system%pl, npl => system%pl%nbody)
Expand Down

0 comments on commit c3ef158

Please sign in to comment.