MODFLOW 6  version 6.6.0.dev0
USGS Modular Hydrologic Model
SerialRouter.f90
Go to the documentation of this file.
3  use kindmodule, only: i4b
5  implicit none
6  private
7 
8  public :: create_serial_router
9 
10  type, public, extends(routerbasetype) :: serialroutertype
11  contains
12  procedure :: initialize => sr_initialize
13  procedure :: route_all => sr_route_all
14  procedure :: route_sln => sr_route_sln
15  procedure :: destroy => sr_destroy
16  end type serialroutertype
17 
18 contains
19 
20  !> Factory method to create serial router
21  !<
22  function create_serial_router() result(router)
23  class(routerbasetype), pointer :: router
24  ! local
25  class(serialroutertype), pointer :: serial_router
26 
27  allocate (serial_router)
28  router => serial_router
29 
30  end function create_serial_router
31 
32  subroutine sr_initialize(this)
33  class(serialroutertype) :: this
34  end subroutine sr_initialize
35 
36  subroutine sr_route_all(this, stage)
37  class(serialroutertype) :: this
38  integer(I4B) :: stage
39 
40  end subroutine sr_route_all
41 
42  subroutine sr_route_sln(this, virtual_sol, stage)
43  class(serialroutertype) :: this
44  type(virtualsolutiontype) :: virtual_sol
45  integer(I4B) :: stage
46 
47  end subroutine sr_route_sln
48 
49  subroutine sr_destroy(this)
50  class(serialroutertype) :: this
51  end subroutine sr_destroy
52 
53 end module serialroutermodule
This module defines variable data types.
Definition: kind.f90:8
subroutine sr_route_sln(this, virtual_sol, stage)
subroutine sr_route_all(this, stage)
subroutine sr_initialize(this)
class(routerbasetype) function, pointer, public create_serial_router()
Factory method to create serial router.
subroutine sr_destroy(this)
This bundles all virtual data for a particular solution.