MODFLOW 6  version 6.7.0.dev2
USGS Modular Hydrologic Model
MethodSubcell.f90
Go to the documentation of this file.
2  use kindmodule, only: dp, i4b
9 
10  private
11  public :: methodsubcelltype
12 
13  type, abstract, extends(methodcelltype) :: methodsubcelltype
14  contains
15  procedure, public :: assess
16  procedure, public :: subcellexit
17  procedure, public :: get_level
18  end type methodsubcelltype
19 
20 contains
21 
22  subroutine assess(this, particle, cell_defn, tmax)
23  ! dummy
24  class(methodsubcelltype), intent(inout) :: this
25  type(particletype), pointer, intent(inout) :: particle
26  type(celldefntype), pointer, intent(inout) :: cell_defn
27  real(DP), intent(in) :: tmax
28  ! noop
29  end subroutine assess
30 
31  !> @brief Particle exits a subcell.
32  subroutine subcellexit(this, particle)
33  class(methodsubcelltype), intent(inout) :: this
34  type(particletype), pointer, intent(inout) :: particle
35  class(particleeventtype), pointer :: event
36 
37  allocate (subcellexiteventtype :: event)
38  select type (event)
39  type is (subcellexiteventtype)
40  event%isc = particle%itrdomain(level_subfeature)
41  event%exit_face = particle%iboundary(level_subfeature)
42  end select
43  call this%events%dispatch(particle, event)
44  end subroutine subcellexit
45 
46  !> @brief Get the subcell method's level.
47  function get_level(this) result(level)
48  class(methodsubcelltype), intent(in) :: this
49  integer(I4B) :: level
50  level = level_subfeature
51  end function get_level
52 
53 end module MethodSubcellModule
This module defines variable data types.
Definition: kind.f90:8
Particle tracking strategies.
Definition: Method.f90:2
@, public level_subfeature
Definition: Method.f90:38
subroutine subcellexit(this, particle)
Particle exits a subcell.
integer(i4b) function get_level(this)
Get the subcell method's level.
Base grid cell definition.
Definition: CellDefn.f90:10
Base type for particle events.
Particle tracked by the PRT model.
Definition: Particle.f90:56