MODFLOW 6
version 6.7.0.dev2
USGS Modular Hydrologic Model
Main Page
Modules
Data Types List
Files
File List
File Members
ParticleEvent.f90
Go to the documentation of this file.
1
module
particleeventmodule
2
use
kindmodule
,
only
: dp, i4b, lgp
3
use
errorutilmodule
,
only
:
pstop
4
use
particlemodule
,
only
:
particletype
5
implicit none
6
7
private
8
public
::
particleeventtype
9
public
::
cellexiteventtype
,
terminationeventtype
,
releaseeventtype
10
public
::
timestepeventtype
,
weaksinkeventtype
,
usertimeeventtype
11
public
::
release
,
cellexit
,
timestep
,
terminate
,
weaksink
,
usertime
12
13
!> @brief Particle event enumeration.
14
!!
15
!! A number of events may occur to particles, each of which may (or may
16
!! not) be of interest to the user. The user selects events to report.
17
!<
18
enum
,
bind(C)
19
enumerator
::
release
= 0
!< particle was released
20
enumerator
::
cellexit
= 1
!< particle exited a cell
21
enumerator
::
timestep
= 2
!< time step ended
22
enumerator
::
terminate
= 3
!< particle terminated
23
enumerator
::
weaksink
= 4
!< particle exited a weak sink
24
enumerator
::
usertime
= 5
!< user-specified tracking time
25
end enum
26
27
!> @brief Base type for particle events.
28
!!
29
!! Events may be identical except for their type/code, reflecting the
30
!! fact that several events of interest may occur at a given moment.
31
type
,
abstract
::
particleeventtype
32
type
(
particletype
),
pointer
:: particle => null()
! particle causing the event
33
integer(I4B)
:: code = -1
! event code
34
integer(I4B)
:: kper = 0, kstp = 0
! period and step
35
real
(dp) :: time = 0.0_dp
! simulation time
36
contains
37
procedure
::
get_code
38
procedure
::
get_str
39
end type
particleeventtype
40
41
type
,
extends
(
particleeventtype
) ::
cellexiteventtype
42
end type
cellexiteventtype
43
44
type
,
extends
(
particleeventtype
) ::
terminationeventtype
45
end type
terminationeventtype
46
47
type
,
extends
(
particleeventtype
) ::
releaseeventtype
48
end type
releaseeventtype
49
50
type
,
extends
(
particleeventtype
) ::
timestepeventtype
51
end type
timestepeventtype
52
53
type
,
extends
(
particleeventtype
) ::
weaksinkeventtype
54
end type
weaksinkeventtype
55
56
type
,
extends
(
particleeventtype
) ::
usertimeeventtype
57
end type
usertimeeventtype
58
59
contains
60
integer
function
get_code
(this)
result
(code)
61
class
(
particleeventtype
),
intent(in)
:: this
62
63
select type
(this)
64
type is
(
releaseeventtype
); code = 0
65
type is
(
cellexiteventtype
); code = 1
66
type is
(
timestepeventtype
); code = 2
67
type is
(
terminationeventtype
); code = 3
68
type is
(
weaksinkeventtype
); code = 4
69
type is
(
usertimeeventtype
); code = 5
70
class default
;
call
pstop
(1,
"unknown event type"
)
71
end select
72
end function
get_code
73
74
function
get_str
(this)
result
(str)
75
class
(
particleeventtype
),
intent(in)
:: this
76
character(len=:)
,
allocatable
:: str
77
78
select type
(this)
79
type is
(
releaseeventtype
); str =
"released"
80
type is
(
cellexiteventtype
); str =
"exited cell"
81
type is
(
timestepeventtype
); str =
"completed timestep"
82
type is
(
terminationeventtype
); str =
"terminated"
83
type is
(
weaksinkeventtype
); str =
"exited weak sink"
84
type is
(
usertimeeventtype
); str =
"user-specified tracking time"
85
class default
;
call
pstop
(1,
"unknown event type"
)
86
end select
87
end function
get_str
88
89
end module
particleeventmodule
errorutilmodule
Definition:
ErrorUtil.f90:1
errorutilmodule::pstop
subroutine pstop(status, message)
Stop the program, optionally specifying an error status code.
Definition:
ErrorUtil.f90:24
kindmodule
This module defines variable data types.
Definition:
kind.f90:8
particleeventmodule
Definition:
ParticleEvent.f90:1
particleeventmodule::get_code
integer function get_code(this)
Definition:
ParticleEvent.f90:61
particleeventmodule::weaksink
@, public weaksink
particle exited a weak sink
Definition:
ParticleEvent.f90:23
particleeventmodule::usertime
@, public usertime
user-specified tracking time
Definition:
ParticleEvent.f90:24
particleeventmodule::release
@, public release
particle was released
Definition:
ParticleEvent.f90:19
particleeventmodule::cellexit
@, public cellexit
particle exited a cell
Definition:
ParticleEvent.f90:20
particleeventmodule::terminate
@, public terminate
particle terminated
Definition:
ParticleEvent.f90:22
particleeventmodule::timestep
@, public timestep
time step ended
Definition:
ParticleEvent.f90:21
particleeventmodule::get_str
character(len=:) function, allocatable get_str(this)
Definition:
ParticleEvent.f90:75
particlemodule
Definition:
Particle.f90:1
particleeventmodule::cellexiteventtype
Definition:
ParticleEvent.f90:41
particleeventmodule::particleeventtype
Base type for particle events.
Definition:
ParticleEvent.f90:31
particleeventmodule::releaseeventtype
Definition:
ParticleEvent.f90:47
particleeventmodule::terminationeventtype
Definition:
ParticleEvent.f90:44
particleeventmodule::timestepeventtype
Definition:
ParticleEvent.f90:50
particleeventmodule::usertimeeventtype
Definition:
ParticleEvent.f90:56
particleeventmodule::weaksinkeventtype
Definition:
ParticleEvent.f90:53
particlemodule::particletype
Particle tracked by the PRT model.
Definition:
Particle.f90:59
src
Solution
ParticleTracker
Particle
ParticleEvent.f90
Generated on Thu Jul 3 2025 17:27:46 for MODFLOW 6 by
1.9.1