MODFLOW 6  version 6.8.0.dev0
USGS Modular Hydrologic Model
methodcellpollockmodule Module Reference

Data Types

type  methodcellpollocktype
 

Functions/Subroutines

procedure subroutine, public create_method_cell_pollock (method)
 Create a tracking method. More...
 
subroutine destroy_mcp (this)
 Destroy the tracking method. More...
 
subroutine load_mcp (this, particle, next_level, submethod)
 Load subcell tracking method. More...
 
subroutine pass_mcp (this, particle)
 Having exited the lone subcell, pass the particle to the cell face In this case the lone subcell is the cell. More...
 
subroutine apply_mcp (this, particle, tmax)
 Apply Pollock's method to a rectangular cell. More...
 
subroutine load_subcell (this, particle, subcell)
 Loads the lone rectangular subcell from the rectangular cell. More...
 

Function/Subroutine Documentation

◆ apply_mcp()

subroutine methodcellpollockmodule::apply_mcp ( class(methodcellpollocktype), intent(inout)  this,
type(particletype), intent(inout), pointer  particle,
real(dp), intent(in)  tmax 
)
private

Definition at line 120 of file MethodCellPollock.f90.

121  ! dummy
122  class(MethodCellPollockType), intent(inout) :: this
123  type(ParticleType), pointer, intent(inout) :: particle
124  real(DP), intent(in) :: tmax
125  ! local
126  real(DP) :: xOrigin
127  real(DP) :: yOrigin
128  real(DP) :: zOrigin
129  real(DP) :: sinrot
130  real(DP) :: cosrot
131 
132  select type (cell => this%cell)
133  type is (cellrecttype)
134  call this%assess(particle, this%cell%defn, tmax)
135  if (.not. particle%advancing) return
136 
137  ! Transform model coordinates to local cell coordinates
138  ! (translated/rotated but not scaled relative to model),
139  ! track the particle over the cell, then transform back.
140  xorigin = cell%xOrigin
141  yorigin = cell%yOrigin
142  zorigin = cell%zOrigin
143  sinrot = cell%sinrot
144  cosrot = cell%cosrot
145  call particle%transform(xorigin, yorigin, zorigin, &
146  sinrot, cosrot)
147  call this%track(particle, 2, tmax)
148  call particle%transform(xorigin, yorigin, zorigin, &
149  sinrot, cosrot, invert=.true.)
150  call particle%reset_transform()
151  end select

◆ create_method_cell_pollock()

procedure subroutine, public methodcellpollockmodule::create_method_cell_pollock ( type(methodcellpollocktype), pointer  method)

Definition at line 30 of file MethodCellPollock.f90.

31  ! dummy
32  type(MethodCellPollockType), pointer :: method
33  ! local
34  type(CellRectType), pointer :: cell
35  type(SubcellRectType), pointer :: subcell
36 
37  allocate (method)
38  call create_cell_rect(cell)
39  method%cell => cell
40  method%name => method%cell%type
41  method%delegates = .true.
42  call create_subcell_rect(subcell)
43  method%subcell => subcell
Here is the call graph for this function:
Here is the caller graph for this function:

◆ destroy_mcp()

subroutine methodcellpollockmodule::destroy_mcp ( class(methodcellpollocktype), intent(inout)  this)
private

Definition at line 47 of file MethodCellPollock.f90.

48  class(MethodCellPollockType), intent(inout) :: this
49  deallocate (this%name)

◆ load_mcp()

subroutine methodcellpollockmodule::load_mcp ( class(methodcellpollocktype), intent(inout)  this,
type(particletype), intent(inout), pointer  particle,
integer, intent(in)  next_level,
class(methodtype), intent(inout), pointer  submethod 
)
private

Definition at line 53 of file MethodCellPollock.f90.

54  ! modules
55  use subcellmodule, only: subcelltype
56  ! dummy
57  class(MethodCellPollockType), intent(inout) :: this
58  type(ParticleType), pointer, intent(inout) :: particle
59  integer, intent(in) :: next_level
60  class(MethodType), pointer, intent(inout) :: submethod
61 
62  select type (subcell => this%subcell)
63  type is (subcellrecttype)
64  call this%load_subcell(particle, subcell)
65  end select
66  call method_subcell_plck%init( &
67  fmi=this%fmi, &
68  cell=this%cell, &
69  subcell=this%subcell, &
70  events=this%events, &
71  tracktimes=this%tracktimes)
72  submethod => method_subcell_plck
73  particle%itrdomain(next_level) = 1
A subcell of a cell.
Definition: Subcell.f90:10

◆ load_subcell()

subroutine methodcellpollockmodule::load_subcell ( class(methodcellpollocktype), intent(inout)  this,
type(particletype), intent(inout), pointer  particle,
type(subcellrecttype), intent(inout)  subcell 
)
private

Definition at line 155 of file MethodCellPollock.f90.

156  ! dummy
157  class(MethodCellPollockType), intent(inout) :: this
158  type(ParticleType), pointer, intent(inout) :: particle
159  type(SubcellRectType), intent(inout) :: subcell
160 
161  select type (cell => this%cell)
162  type is (cellrecttype)
163  ! Set cell/subcell numbers
164  subcell%icell = cell%defn%icell
165  subcell%isubcell = 1
166 
167  ! Subcell calculations will be done in local subcell coordinates
168  subcell%dx = cell%dx
169  subcell%dy = cell%dy
170  subcell%dz = cell%dz
171  subcell%sinrot = dzero
172  subcell%cosrot = done
173  subcell%xOrigin = dzero
174  subcell%yOrigin = dzero
175  subcell%zOrigin = dzero
176 
177  ! Set subcell edge velocities
178  subcell%vx1 = cell%vx1 ! cell velocities already account for retfactor and porosity
179  subcell%vx2 = cell%vx2
180  subcell%vy1 = cell%vy1
181  subcell%vy2 = cell%vy2
182  subcell%vz1 = cell%vz1
183  subcell%vz2 = cell%vz2
184  end select

◆ pass_mcp()

subroutine methodcellpollockmodule::pass_mcp ( class(methodcellpollocktype), intent(inout)  this,
type(particletype), intent(inout), pointer  particle 
)

Definition at line 78 of file MethodCellPollock.f90.

79  ! dummy
80  class(MethodCellPollockType), intent(inout) :: this
81  type(ParticleType), pointer, intent(inout) :: particle
82  ! local
83  integer(I4B) :: exitface
84  integer(I4B) :: entryface
85 
86  exitface = particle%iboundary(level_subfeature)
87  ! Map subcell exit face to cell face
88  select case (exitface) ! note: exitFace uses Dave's iface convention
89  case (0)
90  entryface = -1
91  case (1)
92  entryface = 1
93  case (2)
94  entryface = 3
95  case (3)
96  entryface = 4
97  case (4)
98  entryface = 2
99  case (5)
100  entryface = 6 ! note: inface=5 same as inface=1 due to wraparound
101  case (6)
102  entryface = 7
103  end select
104  if (entryface .eq. -1) then
105  particle%iboundary(level_feature) = 0
106  else
107  if ((entryface .ge. 1) .and. (entryface .le. 4)) then
108  ! Account for local cell rotation
109  select type (cell => this%cell)
110  type is (cellrecttype)
111  entryface = entryface + cell%ipvOrigin - 1
112  end select
113  if (entryface .gt. 4) entryface = entryface - 4
114  end if
115  particle%iboundary(level_feature) = entryface
116  end if