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.
198 class(MethodType),
intent(inout) :: this
199 type(ParticleType),
pointer,
intent(inout) :: particle
200 type(CellDefnType),
pointer,
intent(inout) :: cell_defn
202 logical(LGP) :: dry_cell, dry_particle, no_exit_face, stop_zone, weak_sink
204 dry_cell = this%fmi%ibdgwfsat0(cell_defn%icell) == 0
205 dry_particle = particle%z > cell_defn%top
206 no_exit_face = cell_defn%inoexitface > 0
207 stop_zone = cell_defn%izone > 0 .and. particle%istopzone == cell_defn%izone
208 weak_sink = cell_defn%iweaksink > 0
210 particle%izone = cell_defn%izone
212 particle%advancing = .false.
214 call this%save(particle, reason=3)
218 if (no_exit_face .and. .not. dry_cell)
then
219 particle%advancing = .false.
221 call this%save(particle, reason=3)
226 if (particle%istopweaksink > 0)
then
227 particle%advancing = .false.
229 call this%save(particle, reason=3)
232 call this%save(particle, reason=4)
237 if (particle%idrymeth == 0)
then
238 no_exit_face = .false.
239 else if (particle%idrymeth == 1)
then
241 particle%advancing = .false.
243 call this%save(particle, reason=3)
245 else if (particle%idrymeth == 2)
then
247 no_exit_face = .false.
248 particle%advancing = .false.
249 particle%ttrack =
totim
253 call this%save(particle, reason=3)
256 call this%save(particle, reason=2)
258 else if (dry_particle .and. this%name /=
"passtobottom")
then
260 if (particle%idrymeth == 0)
then
262 particle%z = cell_defn%top
263 call this%save(particle, reason=1)
264 else if (particle%idrymeth == 1)
then
266 particle%advancing = .false.
268 call this%save(particle, reason=3)
270 else if (particle%idrymeth == 2)
then
272 no_exit_face = .false.
273 particle%advancing = .false.
278 if (no_exit_face)
then
279 particle%advancing = .false.
281 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