MODFLOW 6 version 6.9.0.dev0
USGS Modular Hydrologic Model
Loading...
Searching...
No Matches
parallelatsmodule Module Reference

Data Types

type  parallelatstype
 Extends ATS so we can do synchronization. More...

Functions/Subroutines

subroutine par_ats_submit_delt (this, kstp, kper, dt, sloc, idir)
 Allow and external caller to submit preferred time step.
subroutine par_ats_set_delt (this, kstp, kper, pertim, perlencurrent, delt)
 Set time step.

Function/Subroutine Documentation

◆ par_ats_set_delt()

subroutine parallelatsmodule::par_ats_set_delt ( class(parallelatstype) this,
integer(i4b), intent(in) kstp,
integer(i4b), intent(in) kper,
real(dp), intent(inout) pertim,
real(dp), intent(in) perlencurrent,
real(dp), intent(inout) delt )
private

Set the time step length (delt) for this time step using the ATS controls, but with synchronization across ranks.

Definition at line 60 of file ParallelAts.f90.

61 class(ParallelAtsType) :: this
62 integer(I4B), intent(in) :: kstp
63 integer(I4B), intent(in) :: kper
64 real(DP), intent(inout) :: pertim
65 real(DP), intent(in) :: perlencurrent
66 real(DP), intent(inout) :: delt
67 ! local
68 type(MpiWorldType), pointer :: mpi_world
69 integer :: ierr
70 real(DP) :: global_delt
71
72 ! reduce delt over all ranks
73 mpi_world => get_mpi_world()
74 call mpi_allreduce(delt, global_delt, 1, mpi_double_precision, &
75 mpi_min, mpi_world%comm, ierr)
76 call check_mpi(ierr)
77
78 delt = global_delt
79
80 call this%AtsType%ats_set_delt(kstp, kper, pertim, perlencurrent, delt)
81
Here is the call graph for this function:

◆ par_ats_submit_delt()

subroutine parallelatsmodule::par_ats_submit_delt ( class(parallelatstype) this,
integer(i4b), intent(in) kstp,
integer(i4b), intent(in) kper,
real(dp), intent(in) dt,
character(len=*), intent(in) sloc,
integer(i4b), intent(in), optional idir )

Submit a preferred time step length. Alternatively, if idir is is passed, then either increase or decrease the submitted time step by the dtadj input variable.

Definition at line 29 of file ParallelAts.f90.

30 class(ParallelAtsType) :: this
31 integer(I4B), intent(in) :: kstp
32 integer(I4B), intent(in) :: kper
33 real(DP), intent(in) :: dt
34 character(len=*), intent(in) :: sloc
35 integer(I4B), intent(in), optional :: idir
36 ! local
37 type(MpiWorldType), pointer :: mpi_world
38 integer :: ierr
39 real(DP) :: global_dt
40
41 if (.not. this%isAdaptivePeriod(kper)) return
42
43 ! reduce dtstable over all ranks
44 mpi_world => get_mpi_world()
45 call mpi_allreduce(this%dtstable, global_dt, 1, mpi_double_precision, &
46 mpi_min, mpi_world%comm, ierr)
47 call check_mpi(ierr)
48
49 this%dtstable = global_dt
50
51 call this%AtsType%ats_submit_delt(kstp, kper, dt, sloc, idir)
52
Here is the call graph for this function: