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

Commit

Permalink
Consolidated box index creation and endpoint index shift operations
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Nov 17, 2021
1 parent 6aaa4a6 commit fc37e04
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/encounter/encounter_check.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1112,10 +1112,11 @@ subroutine sweep_dl(i, n1, n2, ntot, ext_ind, ibegi, iendi, ibeg, iend, lencount

lencounteri(:) = .false.
lencounterj(jlo:jhi) = .false.
box(:) = ext_ind(jlo:jhi)

where(box(jlo:jhi) > ntot)
box(jlo:jhi) = box(jlo:jhi) - ntot
where(ext_ind(jlo:jhi) > ntot)
box(jlo:jhi) = ext_ind(jlo:jhi) - ntot
elsewhere
box(jlo:jhi) = ext_ind(jlo:jhi)
endwhere

call timer1%stop()
Expand Down Expand Up @@ -1215,10 +1216,11 @@ pure subroutine sweep_sl(n, ext_ind, ibegi, iendi, ibeg, iend, lencounteri)

lencounteri(:) = .false.
lencounterj(jlo:jhi) = .false.
box(:) = ext_ind(jlo:jhi)

where(box(:) > n)
box(:) = box(:) - n
where(ext_ind(jlo:jhi) > n)
box(jlo:jhi) = ext_ind(jlo:jhi) - n
elsewhere
box(jlo:jhi) = ext_ind(jlo:jhi)
endwhere

ibegy(jlo:jhi) = ibeg(2,box(jlo:jhi))
Expand Down

0 comments on commit fc37e04

Please sign in to comment.