Skip to content

Commit

Permalink
print out warning when total # of particles < 1
Browse files Browse the repository at this point in the history
  • Loading branch information
qianglbl committed Aug 1, 2024
1 parent cd5f58c commit 4978d39
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Contrl/AccSimulator.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1459,6 +1459,9 @@ subroutine run_AccSimulator()
nptottmp = sum(Np)
!exit if the beam is outside the beamline
if(distance.gt.blnLength .or. distance.gt.tstop .or. nptottmp.lt.1) then
if(nptottmp.lt.1) then
print*,"Warning: total # of particles is less than 1!! ",nptottmp
endif
exit
endif

Expand Down

0 comments on commit 4978d39

Please sign in to comment.