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

Commit

Permalink
Browse files Browse the repository at this point in the history
…iftest into debug
  • Loading branch information
Carlisle April Wishard committed Dec 2, 2022
2 parents de9db5f + 3742cc8 commit 5bed910
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion examples/Basic_Simulation/output_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import matplotlib.pyplot as plt

# Read in the simulation output and store it as an Xarray dataset
ds = swiftest.Simulation(param_file="param.in").ds
ds = swiftest.Simulation(param_file="simdata/param.in", read_old_output_file=True).data

# Plot of the data and save the output plot
colors = ['white' if x == 'Massive Body' else 'black' for x in ds['particle_type']]
Expand Down
12 changes: 6 additions & 6 deletions src/symba/symba_encounter_check.f90
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ module function symba_encounter_check_pl(self, param, system, dt, irec) result(l
call pl%set_renc(irec)

if (nplt == 0) then
call encounter_check_all_plpl(param, npl, pl%xh, pl%vh, pl%renc, dt, nenc, index1, index2, lvdotr)
call encounter_check_all_plpl(param, npl, pl%xh, pl%vb, pl%renc, dt, nenc, index1, index2, lvdotr)
else
call encounter_check_all_plplm(param, nplm, nplt, pl%xh(:,1:nplm), pl%vh(:,1:nplm), pl%xh(:,nplm+1:npl), &
pl%vh(:,nplm+1:npl), pl%renc(1:nplm), pl%renc(nplm+1:npl), dt, nenc, index1, index2, lvdotr)
call encounter_check_all_plplm(param, nplm, nplt, pl%xh(:,1:nplm), pl%vb(:,1:nplm), pl%xh(:,nplm+1:npl), &
pl%vb(:,nplm+1:npl), pl%renc(1:nplm), pl%renc(nplm+1:npl), dt, nenc, index1, index2, lvdotr)
end if

lany_encounter = nenc > 0_I8B
Expand Down Expand Up @@ -136,7 +136,7 @@ module function symba_encounter_check(self, param, system, dt, irec) result(lany
i = self%index1(k)
j = self%index2(k)
xr(:) = pl%xh(:,j) - pl%xh(:,i)
vr(:) = pl%vh(:,j) - pl%vh(:,i)
vr(:) = pl%vb(:,j) - pl%vb(:,i)
rcrit12 = pl%renc(i) + pl%renc(j)
call encounter_check_one(xr(1), xr(2), xr(3), vr(1), vr(2), vr(3), rcrit12, dt, lencounter(lidx), self%lvdotr(k))
if (lencounter(lidx)) then
Expand All @@ -151,7 +151,7 @@ module function symba_encounter_check(self, param, system, dt, irec) result(lany
i = self%index1(k)
j = self%index2(k)
xr(:) = tp%xh(:,j) - pl%xh(:,i)
vr(:) = tp%vh(:,j) - pl%vh(:,i)
vr(:) = tp%vb(:,j) - pl%vb(:,i)
call encounter_check_one(xr(1), xr(2), xr(3), vr(1), vr(2), vr(3), pl%renc(i), dt, &
lencounter(lidx), self%lvdotr(k))
if (lencounter(lidx)) then
Expand Down Expand Up @@ -213,7 +213,7 @@ module function symba_encounter_check_tp(self, param, system, dt, irec) result(l

associate(tp => self, ntp => self%nbody, pl => system%pl, npl => system%pl%nbody)
call pl%set_renc(irec)
call encounter_check_all_pltp(param, npl, ntp, pl%xh, pl%vh, tp%xh, tp%vh, pl%renc, dt, nenc, index1, index2, lvdotr)
call encounter_check_all_pltp(param, npl, ntp, pl%xh, pl%vb, tp%xh, tp%vb, pl%renc, dt, nenc, index1, index2, lvdotr)

lany_encounter = nenc > 0
if (lany_encounter) then
Expand Down

0 comments on commit 5bed910

Please sign in to comment.