MODFLOW 6  version 6.9.0.dev0
USGS Modular Hydrologic Model
GwfStoExt.f90
Go to the documentation of this file.
2  use kindmodule, only: i4b, lgp, dp
4  use budgetmodule, only: budgettype
5  implicit none
6  private
7 
8  integer(I4B), public, parameter :: default_storage = 0
9  integer(I4B), public, parameter :: uzr_storage = 1
10  integer(I4B), public, parameter :: swi_storage = 2
11  integer(I4B), public, parameter :: max_ext_sto_forms = 2 !< 'cause default is not part of the (external) storage formulations
12 
13  type, abstract, public :: gwfstoformulationtype
14  contains
15  procedure(is_active_if), deferred :: is_active
16  procedure(fc_if), deferred :: fc
17  procedure(fn_if), deferred :: fn
18  procedure(cq_if), deferred :: cq
19  procedure(bd_if), deferred :: bd
20  procedure(save_flows_if), deferred :: save_flows
21  end type gwfstoformulationtype
22 
23  !> @brief Container to allow arrays of polymorphic extension pointers
24  !<
25  type, public :: gwfstoformcontainertype
26  logical(LGP) :: is_active = .false.
27  class(gwfstoformulationtype), pointer :: form => null() !< the extended flow calculator
29 
30  abstract interface
31  function is_active_if(this, n) result(is_active)
32  import gwfstoformulationtype, i4b, lgp
33  class(gwfstoformulationtype), intent(inout) :: this
34  integer(I4B), intent(in) :: n
35  logical(LGP) :: is_active
36  end function
37  subroutine fc_if(this, kiter, matrix_sln, rhs, idxglo, h_old, h_new)
38  import gwfstoformulationtype, matrixbasetype, i4b, dp
39  class(gwfstoformulationtype), intent(inout) :: this
40  integer(I4B), intent(in) :: kiter
41  class(matrixbasetype), pointer, intent(inout) :: matrix_sln
42  real(DP), dimension(:), intent(inout) :: rhs
43  integer(I4B), dimension(:), intent(in) :: idxglo
44  real(DP), dimension(:), intent(in) :: h_old
45  real(DP), dimension(:), intent(in) :: h_new
46  end subroutine
47  subroutine fn_if(this, kiter, matrix_sln, rhs, idxglo, h_old, h_new)
48  import gwfstoformulationtype, matrixbasetype, i4b, dp
49  class(gwfstoformulationtype), intent(inout) :: this
50  integer(I4B), intent(in) :: kiter
51  class(matrixbasetype), pointer, intent(inout) :: matrix_sln
52  real(DP), dimension(:), intent(inout) :: rhs
53  integer(I4B), dimension(:), intent(in) :: idxglo
54  real(DP), dimension(:), intent(in) :: h_old
55  real(DP), dimension(:), intent(in) :: h_new
56  end subroutine
57  subroutine cq_if(this, flowja, h_new, h_old)
58  import gwfstoformulationtype, i4b, dp
59  class(gwfstoformulationtype), intent(inout) :: this
60  real(DP), dimension(:), intent(inout) :: flowja
61  real(DP), dimension(:), intent(in) :: h_new
62  real(DP), dimension(:), intent(in) :: h_old
63  end subroutine
64  subroutine bd_if(this, isuppress_output, model_budget)
66  class(gwfstoformulationtype), intent(inout) :: this
67  integer(I4B), intent(in) :: isuppress_output
68  type(budgettype), intent(inout) :: model_budget
69  end subroutine bd_if
70  subroutine save_flows_if(this, iprint, ibinun)
71  import gwfstoformulationtype, i4b
72  class(gwfstoformulationtype), intent(inout) :: this
73  integer(I4B), intent(in) :: iprint
74  integer(I4B), intent(in) :: ibinun
75  end subroutine save_flows_if
76  end interface
77 
78 end module gwfstoextmodule
This module contains the BudgetModule.
Definition: Budget.f90:20
integer(i4b), parameter, public max_ext_sto_forms
'cause default is not part of the (external) storage formulations
Definition: GwfStoExt.f90:11
integer(i4b), parameter, public default_storage
Definition: GwfStoExt.f90:8
integer(i4b), parameter, public swi_storage
Definition: GwfStoExt.f90:10
integer(i4b), parameter, public uzr_storage
Definition: GwfStoExt.f90:9
This module defines variable data types.
Definition: kind.f90:8
Derived type for the Budget object.
Definition: Budget.f90:40
Container to allow arrays of polymorphic extension pointers.
Definition: GwfStoExt.f90:25