MODFLOW 6  version 6.7.0.dev3
USGS Modular Hydrologic Model
IsothermInterface.f90
Go to the documentation of this file.
2  use kindmodule, only: dp, i4b
3 
4  implicit none
5  private
6  public :: isothermtype
7 
8  !> @brief Interface for isotherms.
9  !<
10  type, abstract :: isothermtype
11  contains
12  procedure(value_if), deferred :: value !< Evaluate isotherm value at node n
13  procedure(derivative_if), deferred :: derivative !< Evaluate derivative d(value)/dc at node n
14  end type isothermtype
15 
16  abstract interface
17  !> @brief Evaluate the isotherm at a given node
18  !<
19  function value_if(this, c, n) result(val)
20  ! -- import
21  import :: isothermtype, dp, i4b
22  ! -- return
23  real(dp) :: val !< isotherm value
24  ! -- dummy
25  class(isothermtype), intent(in) :: this !< isotherm object
26  real(dp), dimension(:), intent(in) :: c !< concentration array
27  integer(I4B), intent(in) :: n !< node index
28  end function value_if
29 
30  !> @brief Evaluate derivative of the isotherm at a given node
31  !<
32  function derivative_if(this, c, n) result(derv)
33  ! -- import
34  import :: isothermtype, dp, i4b
35  ! -- return
36  real(dp) :: derv !< derivative d(value)/dc evaluated at c
37  ! -- dummy
38  class(isothermtype), intent(in) :: this !< isotherm object
39  real(dp), dimension(:), intent(in) :: c !< concentration array
40  integer(I4B), intent(in) :: n !< node index
41  end function derivative_if
42  end interface
43 
44 end module isotherminterfacemodule
Evaluate derivative of the isotherm at a given node.
Evaluate the isotherm at a given node.
This module defines variable data types.
Definition: kind.f90:8