MODFLOW 6  version 6.6.0.dev0
USGS Modular Hydrologic Model
runcontrolmodule Module Reference

Data Types

type  runcontroltype
 

Functions/Subroutines

class(runcontroltype) function, pointer, public create_seq_run_control ()
 
subroutine ctrl_start (this)
 
subroutine ctrl_finish (this)
 
subroutine ctrl_at_stage (this, stage)
 This will call the handler for a particular stage. More...
 
subroutine init_handler (this)
 
subroutine ctrl_after_con_cr (this)
 Actions after connections have been created. More...
 
subroutine before_con_df (this)
 Actions before defining the connections. More...
 
subroutine after_con_df (this)
 Actions after defining connections. More...
 
subroutine rc_solution_sync (num_sol, stage, ctx)
 Synchronizes from within numerical solution (delegate) More...
 
subroutine destroy (this)
 

Function/Subroutine Documentation

◆ after_con_df()

subroutine runcontrolmodule::after_con_df ( class(runcontroltype this)
private

Definition at line 139 of file RunControl.f90.

140  class(RunControlType) :: this
141 
142  ! Reduce the halo
143  call this%virtual_data_mgr%compress_halo()
144 
145  ! Add variables in interface models to the mapper
146  call this%mapper%add_interface_vars()
147 

◆ before_con_df()

subroutine runcontrolmodule::before_con_df ( class(runcontroltype), target  this)
private

Set up the virtual data manager: The models and exchanges in the halo for this interface have been determined. Add them to the virtual data manager for synchronization. (After which the interface model

Definition at line 110 of file RunControl.f90.

111  class(RunControlType), target :: this
112  ! local
113  integer(I4B) :: i
114  class(*), pointer :: obj_ptr
115  class(NumericalSolutionType), pointer :: sol
116 
117  ! Add (halo) models and exchanges to the virtual
118  ! solutions. Set the synchronization handler
119  ! in the numerical solution.
120  do i = 1, basesolutionlist%Count()
121  obj_ptr => basesolutionlist%GetItem(i)
122  select type (obj_ptr)
123  class is (numericalsolutiontype)
124  sol => obj_ptr
125  call this%virtual_data_mgr%add_solution(sol)
126  sol%synchronize => rc_solution_sync
127  sol%synchronize_ctx => this
128  end select
129  end do
130 
131  ! The remote data fields in exchanges need to
132  ! be copied in from the virtual exchanges
133  call this%mapper%add_exchange_vars()
134 
Here is the call graph for this function:

◆ create_seq_run_control()

class(runcontroltype) function, pointer, public runcontrolmodule::create_seq_run_control

Definition at line 31 of file RunControl.f90.

32  class(RunControlType), pointer :: run_controller
33 
34  allocate (run_controller)
35 
Here is the caller graph for this function:

◆ ctrl_after_con_cr()

subroutine runcontrolmodule::ctrl_after_con_cr ( class(runcontroltype this)

Definition at line 96 of file RunControl.f90.

97  class(RunControlType) :: this
98 
99  call this%virtual_data_mgr%activate_halo()
100 

◆ ctrl_at_stage()

subroutine runcontrolmodule::ctrl_at_stage ( class(runcontroltype this,
integer(i4b)  stage 
)

Definition at line 65 of file RunControl.f90.

66  class(RunControlType) :: this
67  integer(I4B) :: stage
68 
69  if (stage == stg_bfr_mdl_df) then
70  call this%init_handler()
71  else if (stage == stg_aft_con_cr) then
72  call this%after_con_cr()
73  else if (stage == stg_bfr_con_df) then
74  call this%before_con_df()
75  else if (stage == stg_aft_con_df) then
76  call this%after_con_df()
77  end if
78 
79  call this%virtual_data_mgr%synchronize(stage)
80  call this%mapper%scatter(0, stage)
81 

◆ ctrl_finish()

subroutine runcontrolmodule::ctrl_finish ( class(runcontroltype this)
private

Definition at line 45 of file RunControl.f90.

46  use simvariablesmodule, only: iout
48  use timermodule, only: elapsed_time
49  use simmodule, only: final_message
50  class(RunControlType) :: this
51 
52  ! clean up
53  call this%destroy()
54 
55  ! -- Write memory usage, elapsed time and terminate
56  call mem_write_usage(iout)
57  call mem_da()
58  call elapsed_time(iout, 1)
59  call final_message()
60 
subroutine, public mem_write_usage(iout)
Write memory manager memory usage based on the user-specified memory_print_option.
subroutine, public mem_da()
Deallocate memory in the memory manager.
This module contains simulation methods.
Definition: Sim.f90:10
subroutine, public final_message()
Create final message.
Definition: Sim.f90:472
This module contains simulation variables.
Definition: SimVariables.f90:9
integer(i4b) iout
file unit number for simulation output
subroutine, public elapsed_time(iout, iprtim)
Get end time and calculate elapsed time.
Definition: Timer.f90:36
Here is the call graph for this function:

◆ ctrl_start()

subroutine runcontrolmodule::ctrl_start ( class(runcontroltype this)
private

Definition at line 38 of file RunControl.f90.

39  class(RunControlType) :: this
40 
41  allocate (this%virtual_data_mgr)
42 

◆ destroy()

subroutine runcontrolmodule::destroy ( class(runcontroltype this)

Definition at line 166 of file RunControl.f90.

167  class(RunControlType) :: this
168 
169  call this%virtual_data_mgr%destroy()
170  deallocate (this%virtual_data_mgr)
171 

◆ init_handler()

subroutine runcontrolmodule::init_handler ( class(runcontroltype), target  this)
private

Definition at line 84 of file RunControl.f90.

86  class(RunControlType), target :: this
87 
88  call this%virtual_data_mgr%create(simulation_mode)
89  call this%virtual_data_mgr%init()
90  call this%mapper%init()
91 
character(len=linelength) simulation_mode

◆ rc_solution_sync()

subroutine runcontrolmodule::rc_solution_sync ( class(numericalsolutiontype num_sol,
integer(i4b)  stage,
class(*), pointer  ctx 
)
private

Definition at line 152 of file RunControl.f90.

154  class(NumericalSolutionType) :: num_sol
155  integer(I4B) :: stage
156  class(*), pointer :: ctx
157 
158  select type (ctx)
159  class is (runcontroltype)
160  call ctx%virtual_data_mgr%synchronize_sln(num_sol%id, stage)
161  call ctx%mapper%scatter(num_sol%id, stage)
162  end select
163 
Here is the caller graph for this function: