MODFLOW 6  version 6.7.0.dev2
USGS Modular Hydrologic Model
centraldifferenceschememodule Module Reference

Data Types

interface  centraldifferenceschemetype
 

Functions/Subroutines

type(centraldifferenceschemetype) function constructor (dis, fmi)
 
type(coefficientstype) function compute (this, n, m, iposnm, phi)
 

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,
real(dp), dimension(:), intent(in)  phi 
)
private

Definition at line 39 of file CentralDifferenceScheme.f90.

40  !-- return
41  type(CoefficientsType) :: phi_face
42  ! -- dummy
43  class(CentralDifferenceSchemeType), target :: this
44  integer(I4B), intent(in) :: n
45  integer(I4B), intent(in) :: m
46  integer(I4B), intent(in) :: iposnm
47  real(DP), intent(in), dimension(:) :: phi
48  ! -- local
49  real(DP) :: lnm, lmn, omega
50 
51  ! -- calculate weight based on distances between nodes and the shared
52  ! face of the connection
53  if (this%dis%con%ihc(this%dis%con%jas(iposnm)) == 0) then
54  ! -- vertical connection; assume cell is fully saturated
55  lnm = dhalf * (this%dis%top(n) - this%dis%bot(n))
56  lmn = dhalf * (this%dis%top(m) - this%dis%bot(m))
57  else
58  ! -- horizontal connection
59  lnm = this%dis%con%cl1(this%dis%con%jas(iposnm))
60  lmn = this%dis%con%cl2(this%dis%con%jas(iposnm))
61  end if
62 
63  omega = lmn / (lnm + lmn)
64 
65  phi_face%c_n = omega
66  phi_face%c_m = done - omega
67 

◆ constructor()

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

Definition at line 27 of file CentralDifferenceScheme.f90.

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