MODFLOW 6  version 6.7.0.dev3
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  !> @brief Abstract base type for subcell tracking methods
14  type, abstract, extends(methodcelltype) :: methodsubcelltype
15  contains
16  procedure, public :: assess
17  procedure, public :: subcellexit
18  procedure, public :: get_level
19  end type methodsubcelltype
20 
21 contains
22 
23  !> @brief Assess conditions before tracking
24  subroutine assess(this, particle, cell_defn, tmax)
25  ! dummy
26  class(methodsubcelltype), intent(inout) :: this
27  type(particletype), pointer, intent(inout) :: particle
28  type(celldefntype), pointer, intent(inout) :: cell_defn
29  real(DP), intent(in) :: tmax
30  ! noop
31  end subroutine assess
32 
33  !> @brief Particle exits a subcell.
34  subroutine subcellexit(this, particle)
35  class(methodsubcelltype), intent(inout) :: this
36  type(particletype), pointer, intent(inout) :: particle
37  class(particleeventtype), pointer :: event
38 
39  allocate (subcellexiteventtype :: event)
40  select type (event)
41  type is (subcellexiteventtype)
42  event%isc = particle%itrdomain(level_subfeature)
43  event%exit_face = particle%iboundary(level_subfeature)
44  end select
45  call this%events%dispatch(particle, event)
46  end subroutine subcellexit
47 
48  !> @brief Get the subcell method's level.
49  function get_level(this) result(level)
50  class(methodsubcelltype), intent(in) :: this
51  integer(I4B) :: level
52  level = level_subfeature
53  end function get_level
54 
55 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:42
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:25
Abstract base type for subcell tracking methods.
Base type for particle events.
Particle tracked by the PRT model.
Definition: Particle.f90:56