Skip to content

Commit c34196c

Browse files
authored
refactor(prt): improve naming for model level tracking method routines (#2514)
make naming consistent and reflect the fact that these routines load data onto the cell
1 parent 24bcc10 commit c34196c

File tree

3 files changed

+67
-67
lines changed

3 files changed

+67
-67
lines changed

src/Solution/ParticleTracker/Method/MethodDis.f90

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ module MethodDisModule
2929
procedure :: get_top !< get cell top elevation
3030
procedure :: update_flowja !< load intercell mass flows
3131
procedure :: load_particle !< load particle properties
32-
procedure :: load_properties !< load cell properties
33-
procedure :: load_neighbors !< load cell face neighbors
34-
procedure :: load_flows !< load cell face flows
35-
procedure :: load_boundary_flows_to_defn !< load boundary flows to the cell definition
36-
procedure :: load_face_flows_to_defn !< load face flows to the cell definition
37-
procedure :: load_celldefn !< load cell definition from the grid
32+
procedure :: load_cell_properties !< load basic cell properties
33+
procedure :: load_cell_neighbors !< load cell face neighbors
34+
procedure :: load_cell_flows !< load cell flows
35+
procedure :: load_cell_boundary_flows !< load boundary flows to the cell definition
36+
procedure :: load_cell_face_flows !< load face flows to the cell definition
37+
procedure :: load_cell_defn !< load cell definition from the grid
3838
procedure :: load_cell !< load cell geometry and flows
3939
end type MethodDisType
4040

@@ -146,7 +146,7 @@ subroutine load_dis(this, particle, next_level, submethod)
146146
select type (cell => this%cell)
147147
type is (CellRectType)
148148
ic = particle%itrdomain(next_level)
149-
call this%load_celldefn(ic, cell%defn)
149+
call this%load_cell_defn(ic, cell%defn)
150150
call this%load_cell(ic, cell)
151151
if (this%fmi%ibdgwfsat0(ic) == 0) then
152152
call method_cell_ptb%init( &
@@ -318,25 +318,25 @@ function get_top(this, iatop) result(top)
318318
end function get_top
319319

320320
!> @brief Loads cell definition from the grid
321-
subroutine load_celldefn(this, ic, defn)
321+
subroutine load_cell_defn(this, ic, defn)
322322
! dummy
323323
class(MethodDisType), intent(inout) :: this
324324
integer(I4B), intent(in) :: ic
325325
type(CellDefnType), pointer, intent(inout) :: defn
326326

327-
call this%load_properties(ic, defn)
327+
call this%load_cell_properties(ic, defn)
328328
call this%fmi%dis%get_polyverts( &
329329
defn%icell, &
330330
defn%polyvert, &
331331
closed=.true.)
332-
call this%load_neighbors(defn)
333-
call this%load_saturation_status(defn)
332+
call this%load_cell_neighbors(defn)
333+
call this%load_cell_saturation_status(defn)
334334
defn%ispv180(1:defn%npolyverts + 1) = .false.
335-
call this%load_flows(defn)
335+
call this%load_cell_flows(defn)
336336

337-
end subroutine load_celldefn
337+
end subroutine load_cell_defn
338338

339-
subroutine load_properties(this, ic, defn)
339+
subroutine load_cell_properties(this, ic, defn)
340340
! dummy
341341
class(MethodDisType), intent(inout) :: this
342342
integer(I4B), intent(in) :: ic
@@ -365,11 +365,11 @@ subroutine load_properties(this, ic, defn)
365365
defn%can_be_rect = .true.
366366
defn%can_be_quad = .false.
367367

368-
end subroutine load_properties
368+
end subroutine load_cell_properties
369369

370370
!> @brief Loads face neighbors to cell definition from the grid.
371371
!! Assumes cell index and number of vertices are already loaded.
372-
subroutine load_neighbors(this, defn)
372+
subroutine load_cell_neighbors(this, defn)
373373
! dummy
374374
class(MethodDisType), intent(inout) :: this
375375
type(CellDefnType), pointer, intent(inout) :: defn
@@ -433,12 +433,12 @@ subroutine load_neighbors(this, defn)
433433
end select
434434
! List of edge (polygon) faces wraps around
435435
defn%facenbr(defn%npolyverts + 1) = defn%facenbr(1)
436-
end subroutine load_neighbors
436+
end subroutine load_cell_neighbors
437437

438438
!> @brief Load flows into the cell definition.
439439
!! These include face, boundary and net distributed flows.
440440
!! Assumes cell index and number of vertices are already loaded.
441-
subroutine load_flows(this, defn)
441+
subroutine load_cell_flows(this, defn)
442442
class(MethodDisType), intent(inout) :: this
443443
type(CellDefnType), pointer, intent(inout) :: defn
444444

@@ -447,10 +447,10 @@ subroutine load_flows(this, defn)
447447
! the last two elements, respectively, for size npolyverts + 3.
448448
! If there is no flow through any face, set a no-exit-face flag.
449449
defn%faceflow = DZERO
450-
call this%load_boundary_flows_to_defn(defn)
451-
call this%load_face_flows_to_defn(defn)
452-
call this%cap_wt_flow(defn)
453-
call this%load_no_exit_face(defn)
450+
call this%load_cell_boundary_flows(defn)
451+
call this%load_cell_face_flows(defn)
452+
call this%cap_cell_wt_flow(defn)
453+
call this%load_cell_no_exit_face(defn)
454454

455455
! Add up net distributed flow
456456
defn%distflow = this%fmi%SourceFlows(defn%icell) + &
@@ -463,9 +463,9 @@ subroutine load_flows(this, defn)
463463
else
464464
defn%iweaksink = 0
465465
end if
466-
end subroutine load_flows
466+
end subroutine load_cell_flows
467467

468-
subroutine load_face_flows_to_defn(this, defn)
468+
subroutine load_cell_face_flows(this, defn)
469469
! dummy
470470
class(MethodDisType), intent(inout) :: this
471471
type(CellDefnType), pointer, intent(inout) :: defn
@@ -481,11 +481,11 @@ subroutine load_face_flows_to_defn(this, defn)
481481
defn%faceflow(m) = defn%faceflow(m) + q
482482
end if
483483
end do
484-
end subroutine load_face_flows_to_defn
484+
end subroutine load_cell_face_flows
485485

486486
!> @brief Add boundary flows to the cell definition faceflow array.
487487
!! Assumes cell index and number of vertices are already loaded.
488-
subroutine load_boundary_flows_to_defn(this, defn)
488+
subroutine load_cell_boundary_flows(this, defn)
489489
! dummy
490490
class(MethodDisType), intent(inout) :: this
491491
type(CellDefnType), pointer, intent(inout) :: defn
@@ -506,6 +506,6 @@ subroutine load_boundary_flows_to_defn(this, defn)
506506
this%fmi%BoundaryFlows(ioffset + this%fmi%max_faces - 1)
507507
defn%faceflow(7) = defn%faceflow(7) + &
508508
this%fmi%BoundaryFlows(ioffset + this%fmi%max_faces)
509-
end subroutine load_boundary_flows_to_defn
509+
end subroutine load_cell_boundary_flows
510510

511511
end module MethodDisModule

src/Solution/ParticleTracker/Method/MethodDisv.f90

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ module MethodDisvModule
3131
procedure :: map_neighbor !< map a location on the cell face to the shared face of a neighbor
3232
procedure :: update_flowja !< update intercell mass flows
3333
procedure :: load_particle !< load particle properties
34-
procedure :: load_properties !< load cell properties
35-
procedure :: load_polygon !< load cell polygon
36-
procedure :: load_neighbors !< load cell face neighbors
37-
procedure :: load_indicators !< load cell 180-degree vertex indicator
38-
procedure :: load_flows !< load the cell's flows
39-
procedure :: load_boundary_flows_to_defn_poly !< load boundary flows to a polygonal cell definition
40-
procedure :: load_face_flows_to_defn_poly !< load face flows to a polygonal cell definition
34+
procedure :: load_cell_properties !< load cell properties
35+
procedure :: load_cell_polygon !< load cell polygon
36+
procedure :: load_cell_neighbors !< load cell face neighbors
37+
procedure :: load_cell_flags !< load cell 180-degree vertex indicator
38+
procedure :: load_cell_flows !< load the cell's flows
39+
procedure :: load_cell_boundary_flows !< load boundary flows to a polygonal cell definition
40+
procedure :: load_cell_face_flows !< load face flows to a polygonal cell definition
4141
end type MethodDisvType
4242

4343
contains
@@ -315,16 +315,16 @@ subroutine load_cell_defn(this, ic, defn)
315315
integer(I4B), intent(in) :: ic
316316
type(CellDefnType), pointer, intent(inout) :: defn
317317

318-
call this%load_properties(ic, defn)
319-
call this%load_polygon(defn)
320-
call this%load_neighbors(defn)
321-
call this%load_saturation_status(defn)
322-
call this%load_indicators(defn)
323-
call this%load_flows(defn)
318+
call this%load_cell_properties(ic, defn)
319+
call this%load_cell_polygon(defn)
320+
call this%load_cell_neighbors(defn)
321+
call this%load_cell_saturation_status(defn)
322+
call this%load_cell_flags(defn)
323+
call this%load_cell_flows(defn)
324324
end subroutine load_cell_defn
325325

326326
!> @brief Loads cell properties to cell definition from the grid.
327-
subroutine load_properties(this, ic, defn)
327+
subroutine load_cell_properties(this, ic, defn)
328328
! dummy
329329
class(MethodDisvType), intent(inout) :: this
330330
integer(I4B), intent(in) :: ic
@@ -355,9 +355,9 @@ subroutine load_properties(this, ic, defn)
355355
defn%ilay = ilay
356356
end select
357357

358-
end subroutine load_properties
358+
end subroutine load_cell_properties
359359

360-
subroutine load_polygon(this, defn)
360+
subroutine load_cell_polygon(this, defn)
361361
! dummy
362362
class(MethodDisvType), intent(inout) :: this
363363
type(CellDefnType), pointer, intent(inout) :: defn
@@ -367,11 +367,11 @@ subroutine load_polygon(this, defn)
367367
defn%polyvert, &
368368
closed=.true.)
369369
defn%npolyverts = size(defn%polyvert, dim=2) - 1
370-
end subroutine load_polygon
370+
end subroutine load_cell_polygon
371371

372372
!> @brief Loads face neighbors to cell definition from the grid
373373
!! Assumes cell index and number of vertices are already loaded.
374-
subroutine load_neighbors(this, defn)
374+
subroutine load_cell_neighbors(this, defn)
375375
! dummy
376376
class(MethodDisvType), intent(inout) :: this
377377
type(CellDefnType), pointer, intent(inout) :: defn
@@ -440,12 +440,12 @@ subroutine load_neighbors(this, defn)
440440
end select
441441
! List of edge (polygon) faces wraps around
442442
defn%facenbr(defn%npolyverts + 1) = defn%facenbr(1)
443-
end subroutine load_neighbors
443+
end subroutine load_cell_neighbors
444444

445445
!> @brief Load flows into the cell definition.
446446
!! These include face, boundary and net distributed flows.
447447
!! Assumes cell index and number of vertices are already loaded.
448-
subroutine load_flows(this, defn)
448+
subroutine load_cell_flows(this, defn)
449449
! dummy
450450
class(MethodDisvType), intent(inout) :: this
451451
type(CellDefnType), pointer, intent(inout) :: defn
@@ -462,10 +462,10 @@ subroutine load_flows(this, defn)
462462
! the last two elements, respectively, for size npolyverts + 3.
463463
! If there is no flow through any face, set a no-exit-face flag.
464464
defn%faceflow = DZERO
465-
call this%load_boundary_flows_to_defn_poly(defn)
466-
call this%load_face_flows_to_defn_poly(defn)
467-
call this%cap_wt_flow(defn)
468-
call this%load_no_exit_face(defn)
465+
call this%load_cell_boundary_flows(defn)
466+
call this%load_cell_face_flows(defn)
467+
call this%cap_cell_wt_flow(defn)
468+
call this%load_cell_no_exit_face(defn)
469469

470470
! Add up net distributed flow
471471
defn%distflow = this%fmi%SourceFlows(defn%icell) + &
@@ -478,9 +478,9 @@ subroutine load_flows(this, defn)
478478
else
479479
defn%iweaksink = 0
480480
end if
481-
end subroutine load_flows
481+
end subroutine load_cell_flows
482482

483-
subroutine load_face_flows_to_defn_poly(this, defn)
483+
subroutine load_cell_face_flows(this, defn)
484484
! dummy
485485
class(MethodDisvType), intent(inout) :: this
486486
type(CellDefnType), pointer, intent(inout) :: defn
@@ -496,11 +496,11 @@ subroutine load_face_flows_to_defn_poly(this, defn)
496496
defn%faceflow(m) = defn%faceflow(m) + q
497497
end if
498498
end do
499-
end subroutine load_face_flows_to_defn_poly
499+
end subroutine load_cell_face_flows
500500

501501
!> @brief Load boundary flows from the grid into a polygonal cell.
502502
!! Assumes cell index and number of vertices are already loaded.
503-
subroutine load_boundary_flows_to_defn_poly(this, defn)
503+
subroutine load_cell_boundary_flows(this, defn)
504504
! dummy
505505
class(MethodDisvType), intent(inout) :: this
506506
type(CellDefnType), pointer, intent(inout) :: defn
@@ -525,13 +525,13 @@ subroutine load_boundary_flows_to_defn_poly(this, defn)
525525
defn%faceflow(npolyverts + 3) + &
526526
this%fmi%BoundaryFlows(ioffset + max_faces)
527527

528-
end subroutine load_boundary_flows_to_defn_poly
528+
end subroutine load_cell_boundary_flows
529529

530530
!> @brief Load 180-degree vertex indicator array and set flags
531531
!! indicating how cell can be represented. Assumes cell index
532532
!! and number of vertices are already loaded.
533533
!<
534-
subroutine load_indicators(this, defn)
534+
subroutine load_cell_flags(this, defn)
535535
! dummy
536536
class(MethodDisvType), intent(inout) :: this
537537
type(CellDefnType), pointer, intent(inout) :: defn
@@ -622,6 +622,6 @@ subroutine load_indicators(this, defn)
622622
defn%can_be_quad = .true.
623623
end if
624624
end if
625-
end subroutine load_indicators
625+
end subroutine load_cell_flags
626626

627627
end module MethodDisvModule

src/Solution/ParticleTracker/Method/MethodModel.f90

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ module MethodModelModule
1818
procedure, public :: assess
1919
procedure, public :: get_level
2020
! cell load utilities
21-
procedure :: cap_wt_flow
22-
procedure :: load_no_exit_face
23-
procedure :: load_saturation_status
21+
procedure :: cap_cell_wt_flow
22+
procedure :: load_cell_no_exit_face
23+
procedure :: load_cell_saturation_status
2424
end type MethodModelType
2525

2626
contains
@@ -51,7 +51,7 @@ end function get_level
5151
!!
5252
!! Assumes cell properties and flows are already loaded.
5353
!<
54-
subroutine cap_wt_flow(this, defn)
54+
subroutine cap_cell_wt_flow(this, defn)
5555
class(MethodModelType), intent(inout) :: this
5656
type(CellDefnType), pointer, intent(inout) :: defn
5757
! local
@@ -66,11 +66,11 @@ subroutine cap_wt_flow(this, defn)
6666
defn%faceflow(itopface) = max(DZERO, defn%faceflow(itopface))
6767
end if
6868

69-
end subroutine cap_wt_flow
69+
end subroutine cap_cell_wt_flow
7070

7171
!> @brief Set flag indicating if the cell has any faces with outflow.
7272
!! Assumes cell properties and flows are already loaded.
73-
subroutine load_no_exit_face(this, defn)
73+
subroutine load_cell_no_exit_face(this, defn)
7474
! dummy
7575
class(MethodModelType), intent(inout) :: this
7676
type(CellDefnType), pointer, intent(inout) :: defn
@@ -83,11 +83,11 @@ subroutine load_no_exit_face(this, defn)
8383
if (defn%faceflow(m) < DZERO) defn%inoexitface = 0
8484
end do
8585

86-
end subroutine load_no_exit_face
86+
end subroutine load_cell_no_exit_face
8787

8888
!> @brief Set the saturation status of a cell.
8989
!! See the status enumeration in CellDefnModule.
90-
subroutine load_saturation_status(this, defn)
90+
subroutine load_cell_saturation_status(this, defn)
9191
! dummy
9292
class(MethodModelType), intent(inout) :: this
9393
type(CellDefnType), pointer, intent(inout) :: defn
@@ -125,6 +125,6 @@ subroutine load_saturation_status(this, defn)
125125
return
126126
end if
127127

128-
end subroutine load_saturation_status
128+
end subroutine load_cell_saturation_status
129129

130130
end module MethodModelModule

0 commit comments

Comments
 (0)