MODFLOW 6 version 6.9.0.dev0
USGS Modular Hydrologic Model
Loading...
Searching...
No Matches
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 !! @return isotherm value
20 !<
21 function value_if(this, c, n) result(val)
22 ! -- import
23 import :: isothermtype, dp, i4b
24 ! -- return
25 real(dp) :: val
26 ! -- dummy
27 class(isothermtype), intent(in) :: this !< isotherm object
28 real(dp), dimension(:), intent(in) :: c !< concentration array
29 integer(I4B), intent(in) :: n !< node index
30 end function value_if
31
32 !> @brief Evaluate derivative of the isotherm at a given node
33 !!
34 !! @return derivative d(value)/dc evaluated at c
35 !<
36 function derivative_if(this, c, n) result(derv)
37 ! -- import
38 import :: isothermtype, dp, i4b
39 ! -- return
40 real(dp) :: derv
41 ! -- dummy
42 class(isothermtype), intent(in) :: this !< isotherm object
43 real(dp), dimension(:), intent(in) :: c !< concentration array
44 integer(I4B), intent(in) :: n !< node index
45 end function derivative_if
46 end interface
47
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