MODFLOW 6
version 6.7.0.dev3
USGS Modular Hydrologic Model
Main Page
Modules
Data Types List
Files
File List
File Members
IGradient.f90
Go to the documentation of this file.
1
module
igradient
2
use
kindmodule
,
only
: dp, i4b
3
4
implicit none
5
private
6
7
public
::
igradienttype
8
9
!> @brief Abstract interface for cell-based gradient computation.
10
!!
11
!! This module defines the abstract type `IGradientType`, which provides a deferred
12
!! interface for computing the gradient of a scalar field at a given cell.
13
!! Any concrete gradient implementation must extend this type and implement the `get` method.
14
!<
15
type
,
abstract
::
igradienttype
16
contains
17
procedure
(
get_if
),
deferred
:: get
18
procedure
(
set_field_if
),
deferred
:: set_field
19
end type
igradienttype
20
21
abstract
interface
22
23
function
get_if
(this, n)
result
(grad_c)
24
! -- import
25
import
igradienttype
26
import
dp, i4b
27
! -- dummy
28
class
(
igradienttype
),
target
:: this
29
integer(I4B)
,
intent(in)
:: n
30
!-- return
31
real
(dp),
dimension(3)
:: grad_c
32
end function
33
34
subroutine
set_field_if
(this, phi)
35
! -- import
36
import
igradienttype
37
import
dp, i4b
38
! -- dummy
39
class
(
igradienttype
),
target
:: this
40
real
(DP),
dimension(:)
,
pointer
,
intent(in)
:: phi
41
end subroutine
42
43
end interface
44
45
contains
46
47
end module
igradient
igradient::get_if
Definition:
IGradient.f90:23
igradient::set_field_if
Definition:
IGradient.f90:34
igradient
Definition:
IGradient.f90:1
kindmodule
This module defines variable data types.
Definition:
kind.f90:8
igradient::igradienttype
Abstract interface for cell-based gradient computation.
Definition:
IGradient.f90:15
src
Model
TransportModel
Gradient
IGradient.f90
Generated on Mon Oct 13 2025 12:56:18 for MODFLOW 6 by
1.9.1