MODFLOW 6  version 6.7.0.dev0
USGS Modular Hydrologic Model
mathutilmodule::mod_offset Interface Reference
Collaboration diagram for mathutilmodule::mod_offset:
Collaboration graph

Private Member Functions

pure integer(i4b) function mod_offset_int (a, n, d)
 Modulo with offset for integer values. More...
 
pure real(dp) function mod_offset_dbl (a, n, d)
 Modulo with offset for double precision values. More...
 

Detailed Description

Definition at line 13 of file MathUtil.f90.

Member Function/Subroutine Documentation

◆ mod_offset_dbl()

pure real(dp) function mathutilmodule::mod_offset::mod_offset_dbl ( real(dp), intent(in)  a,
real(dp), intent(in)  n,
real(dp), intent(in), optional  d 
)
private
Parameters
[in]adividend
[in]ndivisor
[in]doffset

Definition at line 107 of file MathUtil.f90.

108  ! -- dummy
109  real(DP), intent(in) :: a !< dividend
110  real(DP), intent(in) :: n !< divisor
111  real(DP), intent(in), optional :: d !< offset
112  real(DP) :: mo
113  ! -- local
114  real(DP) :: ld
115 
116  if (present(d)) then
117  ld = d
118  else
119  ld = 0
120  end if
121  mo = a - n * floor((a - ld) / n)

◆ mod_offset_int()

pure integer(i4b) function mathutilmodule::mod_offset::mod_offset_int ( integer(i4b), intent(in)  a,
integer(i4b), intent(in)  n,
integer(i4b), intent(in), optional  d 
)
private
Parameters
[in]adividend
[in]ndivisor
[in]doffset

Definition at line 89 of file MathUtil.f90.

90  ! -- dummy
91  integer(I4B), intent(in) :: a !< dividend
92  integer(I4B), intent(in) :: n !< divisor
93  integer(I4B), intent(in), optional :: d !< offset
94  integer(I4B) :: mo
95  ! -- local
96  integer(I4B) :: ld
97 
98  if (present(d)) then
99  ld = d
100  else
101  ld = 0
102  end if
103  mo = a - n * floor(real(a - ld) / n)

The documentation for this interface was generated from the following file: