MODFLOW 6  version 6.7.0.dev1
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 148 of file RunControl.f90.

149  class(RunControlType) :: this
150 
151  ! Reduce the halo
152  call this%virtual_data_mgr%compress_halo()
153 
154  ! Add variables in interface models to the mapper
155  call this%mapper%add_interface_vars()
156 

◆ 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 119 of file RunControl.f90.

120  class(RunControlType), target :: this
121  ! local
122  integer(I4B) :: i
123  class(*), pointer :: obj_ptr
124  class(NumericalSolutionType), pointer :: sol
125 
126  ! Add (halo) models and exchanges to the virtual
127  ! solutions. Set the synchronization handler
128  ! in the numerical solution.
129  do i = 1, basesolutionlist%Count()
130  obj_ptr => basesolutionlist%GetItem(i)
131  select type (obj_ptr)
132  class is (numericalsolutiontype)
133  sol => obj_ptr
134  call this%virtual_data_mgr%add_solution(sol)
135  sol%synchronize => rc_solution_sync
136  sol%synchronize_ctx => this
137  end select
138  end do
139 
140  ! The remote data fields in exchanges need to
141  ! be copied in from the virtual exchanges
142  call this%mapper%add_exchange_vars()
143 
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 33 of file RunControl.f90.

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

◆ ctrl_after_con_cr()

subroutine runcontrolmodule::ctrl_after_con_cr ( class(runcontroltype this)

Definition at line 105 of file RunControl.f90.

106  class(RunControlType) :: this
107 
108  call this%virtual_data_mgr%activate_halo()
109 

◆ ctrl_at_stage()

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

Definition at line 74 of file RunControl.f90.

75  class(RunControlType) :: this
76  integer(I4B) :: stage
77 
78  if (stage == stg_bfr_mdl_df) then
79  call this%init_handler()
80  else if (stage == stg_aft_con_cr) then
81  call this%after_con_cr()
82  else if (stage == stg_bfr_con_df) then
83  call this%before_con_df()
84  else if (stage == stg_aft_con_df) then
85  call this%after_con_df()
86  end if
87 
88  call this%virtual_data_mgr%synchronize(stage)
89  call this%mapper%scatter(0, stage)
90 

◆ ctrl_finish()

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

Definition at line 47 of file RunControl.f90.

48  use simvariablesmodule, only: iout
50  use timermodule, only: elapsed_time
51  use simmodule, only: final_message
52  class(RunControlType) :: this
53 
54  ! clean up
55  call this%destroy()
56 
57  ! -- Write memory usage, elapsed time and terminate
58  call mem_write_usage(iout)
59  call mem_da()
60 
61  ! stop and print timings
62  call g_prof%stop(g_prof%tmr_finalize)
63  call g_prof%stop(g_prof%tmr_run)
64  call g_prof%print(iout)
65  call g_prof%destroy()
66 
67  call elapsed_time(iout, 1)
68  call final_message()
69 
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 40 of file RunControl.f90.

41  class(RunControlType) :: this
42 
43  allocate (this%virtual_data_mgr)
44 

◆ destroy()

subroutine runcontrolmodule::destroy ( class(runcontroltype this)

Definition at line 175 of file RunControl.f90.

176  class(RunControlType) :: this
177 
178  call this%virtual_data_mgr%destroy()
179  deallocate (this%virtual_data_mgr)
180 

◆ init_handler()

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

Definition at line 93 of file RunControl.f90.

95  class(RunControlType), target :: this
96 
97  call this%virtual_data_mgr%create(simulation_mode)
98  call this%virtual_data_mgr%init()
99  call this%mapper%init()
100 
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 161 of file RunControl.f90.

163  class(NumericalSolutionType) :: num_sol
164  integer(I4B) :: stage
165  class(*), pointer :: ctx
166 
167  select type (ctx)
168  class is (runcontroltype)
169  call ctx%virtual_data_mgr%synchronize_sln(num_sol%id, stage)
170  call ctx%mapper%scatter(num_sol%id, stage)
171  end select
172 
Here is the caller graph for this function: