Check a number of conditions determining whether to continue tracking the particle or terminate it, as well as whether to record any output data as per selected reporting conditions.
199 class(MethodType),
intent(inout) :: this
200 type(ParticleType),
pointer,
intent(inout) :: particle
201 type(CellDefnType),
pointer,
intent(inout) :: cell_defn
203 logical(LGP) :: dry_cell, dry_particle, no_exit_face, stop_zone, weak_sink
205 dry_cell = this%fmi%ibdgwfsat0(cell_defn%icell) == 0
206 dry_particle = particle%z > cell_defn%top
207 no_exit_face = cell_defn%inoexitface > 0
208 stop_zone = cell_defn%izone > 0 .and. particle%istopzone == cell_defn%izone
209 weak_sink = cell_defn%iweaksink > 0
211 particle%izone = cell_defn%izone
213 particle%advancing = .false.
215 call this%save(particle, reason=3)
219 if (no_exit_face .and. .not. dry_cell)
then
220 particle%advancing = .false.
222 call this%save(particle, reason=3)
227 if (particle%istopweaksink > 0)
then
228 particle%advancing = .false.
230 call this%save(particle, reason=3)
233 call this%save(particle, reason=4)
238 if (particle%idrymeth == 0)
then
239 no_exit_face = .false.
240 else if (particle%idrymeth == 1)
then
242 particle%advancing = .false.
244 call this%save(particle, reason=3)
246 else if (particle%idrymeth == 2)
then
248 no_exit_face = .false.
249 particle%advancing = .false.
250 particle%ttrack =
totim
254 call this%save(particle, reason=3)
257 call this%save(particle, reason=2)
259 else if (dry_particle .and. this%name /=
"passtobottom")
then
261 if (particle%idrymeth == 0)
then
263 particle%z = cell_defn%top
264 call this%save(particle, reason=1)
265 else if (particle%idrymeth == 1)
then
267 particle%advancing = .false.
269 call this%save(particle, reason=3)
271 else if (particle%idrymeth == 2)
then
273 no_exit_face = .false.
274 particle%advancing = .false.
279 if (no_exit_face)
then
280 particle%advancing = .false.
282 call this%save(particle, reason=3)
logical(lgp), pointer, public endofsimulation
flag indicating end of simulation
real(dp), pointer, public totim
time relative to start of simulation