MODFLOW 6 version 6.9.0.dev0
USGS Modular Hydrologic Model
Loading...
Searching...
No Matches
centraldifferenceschememodule Module Reference

Data Types

interface  centraldifferenceschemetype

Functions/Subroutines

type(centraldifferenceschemetype) function constructor (dis, fmi)
subroutine set_field (this, phi)
 Set the scalar field for which interpolation will be computed.
type(coefficientstype) function compute (this, n, m, iposnm)

Function/Subroutine Documentation

◆ compute()

type(coefficientstype) function centraldifferenceschememodule::compute ( class(centraldifferenceschemetype), target this,
integer(i4b), intent(in) n,
integer(i4b), intent(in) m,
integer(i4b), intent(in) iposnm )
private

Definition at line 54 of file CentralDifferenceScheme.f90.

55 !-- return
56 type(CoefficientsType) :: phi_face
57 ! -- dummy
58 class(CentralDifferenceSchemeType), target :: this
59 integer(I4B), intent(in) :: n
60 integer(I4B), intent(in) :: m
61 integer(I4B), intent(in) :: iposnm
62 ! -- local
63 real(DP) :: lnm, lmn, omega
64 integer(I4B) :: isympos
65
66 ! -- calculate weight based on distances between nodes and the shared
67 ! face of the connection
68 if (this%dis%con%ihc(this%dis%con%jas(iposnm)) == 0) then
69 ! -- vertical connection; assume cell is fully saturated
70 lnm = dhalf * (this%dis%top(n) - this%dis%bot(n))
71 lmn = dhalf * (this%dis%top(m) - this%dis%bot(m))
72 else
73 ! -- horizontal connection
74 ! Get the distance from node n to the face (cl1) and from node m to the face (cl2).
75 ! The distances are dependent on the the node numbering convention and the direction of the connection.
76 isympos = this%dis%con%jas(iposnm)
77 if (n < m) then
78 lnm = this%dis%con%cl1(isympos)
79 lmn = this%dis%con%cl2(isympos)
80 else
81 lnm = this%dis%con%cl2(isympos)
82 lmn = this%dis%con%cl1(isympos)
83 end if
84 end if
85
86 omega = lmn / (lnm + lmn)
87
88 phi_face%c_n = omega
89 phi_face%c_m = done - omega
90

◆ constructor()

type(centraldifferenceschemetype) function centraldifferenceschememodule::constructor ( class(disbasetype), intent(in), pointer dis,
type(tspfmitype), intent(in), pointer fmi )
private

Definition at line 29 of file CentralDifferenceScheme.f90.

30 ! -- return
31 type(CentralDifferenceSchemeType) :: interpolation_scheme
32 ! --dummy
33 class(DisBaseType), pointer, intent(in) :: dis
34 type(TspFmiType), pointer, intent(in) :: fmi
35
36 interpolation_scheme%dis => dis
37 interpolation_scheme%fmi => fmi
38
Here is the caller graph for this function:

◆ set_field()

subroutine centraldifferenceschememodule::set_field ( class(centraldifferenceschemetype), target this,
real(dp), dimension(:), intent(in), pointer phi )
private

This method establishes a pointer to the scalar field data for subsequent central difference interpolation computations.

Definition at line 46 of file CentralDifferenceScheme.f90.

47 ! -- dummy
48 class(CentralDifferenceSchemeType), target :: this
49 real(DP), intent(in), dimension(:), pointer :: phi
50
51 this%phi => phi