MODFLOW 6  version 6.9.0.dev0
USGS Modular Hydrologic Model
GwfNpfExt.f90
Go to the documentation of this file.
2  use kindmodule, only: i4b, dp
4  implicit none
5  private
6 
7  integer(I4B), public, parameter :: default_flow = 0
8  integer(I4B), public, parameter :: uzr_flow = 1
9  integer(I4B), public, parameter :: swi_flow = 2
10  integer(I4B), public, parameter :: max_ext_flow_forms = 2
11 
12  !> @brief Abstract flow formulation that additively contributes terms
13  !!
14  !! A formulation owns its own traversal of cells/connections and decides,
15  !! per element, whether to add terms. Phases a formulation does not
16  !! implement fall back to a no-op so formulations compose additively.
17  !<
18  type, abstract, public :: gwfnpfformulationtype
19  contains
20  procedure(fc_if), deferred :: fc
21  procedure :: cf => cf_noop
22  procedure :: fn => fn_noop
23  procedure :: cq => cq_noop
24  end type gwfnpfformulationtype
25 
26  !> @brief Container to allow arrays of polymorphic extension pointers
27  !<
28  type, public :: gwfnpfformcontainertype
29  class(gwfnpfformulationtype), pointer :: form => null() !< the extended flow calculator
31 
32  abstract interface
33  !> @brief Fill coefficients: formulation loops all connections itself
34  !<
35  subroutine fc_if(this, kiter, matrix_sln, idxglo, rhs, hnew)
36  import gwfnpfformulationtype, matrixbasetype, i4b, dp
37  class(gwfnpfformulationtype), intent(inout) :: this
38  integer(I4B), intent(in) :: kiter
39  class(matrixbasetype), pointer, intent(inout) :: matrix_sln
40  integer(I4B), dimension(:), intent(in) :: idxglo
41  real(DP), dimension(:), intent(inout) :: rhs
42  real(DP), dimension(:), intent(inout) :: hnew
43  end subroutine
44  end interface
45 
46 contains
47 
48  !> @brief No-op coefficient calculation; formulation loops cells itself
49  !<
50  subroutine cf_noop(this, kiter)
51  class(gwfnpfformulationtype), intent(inout) :: this
52  integer(I4B), intent(in) :: kiter
53  end subroutine cf_noop
54 
55  !> @brief No-op newton terms; formulation loops connections itself
56  !<
57  subroutine fn_noop(this, kiter, matrix_sln, idxglo, rhs, hnew)
58  class(gwfnpfformulationtype), intent(inout) :: this
59  integer(I4B), intent(in) :: kiter
60  class(matrixbasetype), pointer, intent(inout) :: matrix_sln
61  integer(I4B), dimension(:), intent(in) :: idxglo
62  real(DP), dimension(:), intent(inout) :: rhs
63  real(DP), dimension(:), intent(inout) :: hnew
64  end subroutine fn_noop
65 
66  !> @brief No-op flow calculation; formulation loops connections itself
67  !<
68  subroutine cq_noop(this, hnew, flowja)
69  class(gwfnpfformulationtype), intent(inout) :: this
70  real(DP), dimension(:), intent(inout) :: hnew
71  real(DP), dimension(:), intent(inout) :: flowja
72  end subroutine cq_noop
73 
74 end module gwfnpfformulationmodule
Fill coefficients: formulation loops all connections itself.
Definition: GwfNpfExt.f90:35
integer(i4b), parameter, public uzr_flow
Definition: GwfNpfExt.f90:8
integer(i4b), parameter, public swi_flow
Definition: GwfNpfExt.f90:9
integer(i4b), parameter, public default_flow
Definition: GwfNpfExt.f90:7
integer(i4b), parameter, public max_ext_flow_forms
Definition: GwfNpfExt.f90:10
subroutine cq_noop(this, hnew, flowja)
No-op flow calculation; formulation loops connections itself.
Definition: GwfNpfExt.f90:69
subroutine fn_noop(this, kiter, matrix_sln, idxglo, rhs, hnew)
No-op newton terms; formulation loops connections itself.
Definition: GwfNpfExt.f90:58
subroutine cf_noop(this, kiter)
No-op coefficient calculation; formulation loops cells itself.
Definition: GwfNpfExt.f90:51
This module defines variable data types.
Definition: kind.f90:8
Container to allow arrays of polymorphic extension pointers.
Definition: GwfNpfExt.f90:28
Abstract flow formulation that additively contributes terms.
Definition: GwfNpfExt.f90:18