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

Commit

Permalink
Shortened and/or split lines to fit gfortran's default line width
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Nov 23, 2021
1 parent a599b9f commit 0987484
Show file tree
Hide file tree
Showing 27 changed files with 282 additions and 159 deletions.
30 changes: 20 additions & 10 deletions src/discard/discard.f90
Original file line number Diff line number Diff line change
Expand Up @@ -128,18 +128,22 @@ subroutine discard_cb_tp(tp, system, param)
tp%status(i) = DISCARDED_RMAX
write(idstr, *) tp%id(i)
write(timestr, *) param%t
write(*, *) "Particle " // trim(adjustl(tp%info(i)%name)) // " (" // trim(adjustl(idstr)) // ")" // " too far from the central body at t = " // trim(adjustl(timestr))
write(*, *) "Particle " // trim(adjustl(tp%info(i)%name)) // " (" // trim(adjustl(idstr)) // ")" // &
" too far from the central body at t = " // trim(adjustl(timestr))
tp%ldiscard(i) = .true.
tp%lmask(i) = .false.
call tp%info(i)%set_value(status="DISCARDED_RMAX", discard_time=param%t, discard_xh=tp%xh(:,i), discard_vh=tp%vh(:,i))
call tp%info(i)%set_value(status="DISCARDED_RMAX", discard_time=param%t, discard_xh=tp%xh(:,i), &
discard_vh=tp%vh(:,i))
else if ((param%rmin >= 0.0_DP) .and. (rh2 < rmin2)) then
tp%status(i) = DISCARDED_RMIN
write(idstr, *) tp%id(i)
write(timestr, *) param%t
write(*, *) "Particle " // trim(adjustl(tp%info(i)%name)) // " (" // trim(adjustl(idstr)) // ")" // " too close to the central body at t = " // trim(adjustl(timestr))
write(*, *) "Particle " // trim(adjustl(tp%info(i)%name)) // " (" // trim(adjustl(idstr)) // ")" // &
" too close to the central body at t = " // trim(adjustl(timestr))
tp%ldiscard(i) = .true.
tp%lmask(i) = .false.
call tp%info(i)%set_value(status="DISCARDED_RMIN", discard_time=param%t, discard_xh=tp%xh(:,i), discard_vh=tp%vh(:,i), discard_body_id=cb%id)
call tp%info(i)%set_value(status="DISCARDED_RMIN", discard_time=param%t, discard_xh=tp%xh(:,i), &
discard_vh=tp%vh(:,i), discard_body_id=cb%id)
else if (param%rmaxu >= 0.0_DP) then
rb2 = dot_product(tp%xb(:, i), tp%xb(:, i))
vb2 = dot_product(tp%vb(:, i), tp%vb(:, i))
Expand All @@ -148,10 +152,12 @@ subroutine discard_cb_tp(tp, system, param)
tp%status(i) = DISCARDED_RMAXU
write(idstr, *) tp%id(i)
write(timestr, *) param%t
write(*, *) "Particle " // trim(adjustl(tp%info(i)%name)) // " (" // trim(adjustl(idstr)) // ")" // " is unbound and too far from barycenter at t = " // trim(adjustl(timestr))
write(*, *) "Particle " // trim(adjustl(tp%info(i)%name)) // " (" // trim(adjustl(idstr)) // ")" // &
" is unbound and too far from barycenter at t = " // trim(adjustl(timestr))
tp%ldiscard(i) = .true.
tp%lmask(i) = .false.
call tp%info(i)%set_value(status="DISCARDED_RMAXU", discard_time=param%t, discard_xh=tp%xh(:,i), discard_vh=tp%vh(:,i))
call tp%info(i)%set_value(status="DISCARDED_RMAXU", discard_time=param%t, discard_xh=tp%xh(:,i), &
discard_vh=tp%vh(:,i))
end if
end if
end if
Expand Down Expand Up @@ -199,9 +205,11 @@ subroutine discard_peri_tp(tp, system, param)
tp%status(i) = DISCARDED_PERI
write(idstr, *) tp%id(i)
write(timestr, *) param%t
write(*, *) "Particle " // trim(adjustl(tp%info(i)%name)) // " (" // trim(adjustl(idstr)) // ")" // " perihelion distance too small at t = " // trim(adjustl(timestr))
write(*, *) "Particle " // trim(adjustl(tp%info(i)%name)) // " (" // trim(adjustl(idstr)) // ")" // &
" perihelion distance too small at t = " // trim(adjustl(timestr))
tp%ldiscard(i) = .true.
call tp%info(i)%set_value(status="DISCARDED_PERI", discard_time=param%t, discard_xh=tp%xh(:,i), discard_vh=tp%vh(:,i), discard_body_id=pl%id(j))
call tp%info(i)%set_value(status="DISCARDED_PERI", discard_time=param%t, discard_xh=tp%xh(:,i), &
discard_vh=tp%vh(:,i), discard_body_id=pl%id(j))
end if
end if
end if
Expand Down Expand Up @@ -247,10 +255,12 @@ subroutine discard_pl_tp(tp, system, param)
write(idstrj, *) pl%id(j)
write(timestr, *) param%t
write(*, *) "Test particle " // trim(adjustl(tp%info(i)%name)) // " (" // trim(adjustl(idstri)) // ")" &
// " too close to massive body " // trim(adjustl(pl%info(i)%name)) // " (" // trim(adjustl(idstrj)) &
// " too close to massive body " // trim(adjustl(pl%info(i)%name)) // &
" (" // trim(adjustl(idstrj)) &
// " at t = " // trim(adjustl(timestr))
tp%ldiscard(i) = .true.
call tp%info(i)%set_value(status="DISCARDED_PLR", discard_time=param%t, discard_xh=tp%xh(:,i), discard_vh=tp%vh(:,i), discard_body_id=pl%id(j))
call tp%info(i)%set_value(status="DISCARDED_PLR", discard_time=param%t, discard_xh=tp%xh(:,i), &
discard_vh=tp%vh(:,i), discard_body_id=pl%id(j))
exit
end if
end do
Expand Down
Loading

0 comments on commit 0987484

Please sign in to comment.