MODFLOW 6  version 6.5.0.dev2
MODFLOW 6 Code Documentation
rectangulargeometrymodule Module Reference

Data Types

type  rectangulargeometrytype
 

Functions/Subroutines

real(dp) function area_sat (this)
 Return saturated area. More...
 
real(dp) function perimeter_sat (this)
 Return saturated perimeter. More...
 
real(dp) function area_wet (this, depth)
 Return wetted area. More...
 
real(dp) function perimeter_wet (this, depth)
 Return wetted perimeter. More...
 
subroutine set_attribute (this, line)
 Set a parameter for this rectangular object. More...
 
subroutine print_attributes (this, iout)
 Print the attributes for this object. More...
 

Function/Subroutine Documentation

◆ area_sat()

real(dp) function rectangulargeometrymodule::area_sat ( class(rectangulargeometrytype this)
private

Definition at line 27 of file RectangularGeometry.f90.

28  ! -- modules
29  use constantsmodule, only: dtwo, dpi
30  ! -- return
31  real(DP) :: area_sat
32  ! -- dummy
33  class(RectangularGeometryType) :: this
34  !
35  ! -- Calculate area
36  area_sat = this%height * this%width
37  !
38  ! -- Return
39  return
This module contains simulation constants.
Definition: Constants.f90:9
real(dp), parameter dpi
real constant
Definition: Constants.f90:127
real(dp), parameter dtwo
real constant 2
Definition: Constants.f90:78

◆ area_wet()

real(dp) function rectangulargeometrymodule::area_wet ( class(rectangulargeometrytype this,
real(dp), intent(in)  depth 
)

Definition at line 61 of file RectangularGeometry.f90.

62  ! -- modules
63  use constantsmodule, only: dtwo, dpi, dzero
64  ! -- return
65  real(DP) :: area_wet
66  ! -- dummy
67  class(RectangularGeometryType) :: this
68  real(DP), intent(in) :: depth
69  !
70  ! -- Calculate area
71  if (depth <= dzero) then
72  area_wet = dzero
73  elseif (depth <= this%height) then
74  area_wet = depth * this%width
75  else
76  area_wet = this%width * this%height
77  end if
78  !
79  ! -- Return
80  return
real(dp), parameter dzero
real constant zero
Definition: Constants.f90:64

◆ perimeter_sat()

real(dp) function rectangulargeometrymodule::perimeter_sat ( class(rectangulargeometrytype this)

Definition at line 44 of file RectangularGeometry.f90.

45  ! -- modules
46  use constantsmodule, only: dtwo, dpi
47  ! -- return
48  real(DP) :: perimeter_sat
49  ! -- dummy
50  class(RectangularGeometryType) :: this
51  !
52  ! -- Calculate area
53  perimeter_sat = dtwo * (this%height + this%width)
54  !
55  ! -- Return
56  return

◆ perimeter_wet()

real(dp) function rectangulargeometrymodule::perimeter_wet ( class(rectangulargeometrytype this,
real(dp), intent(in)  depth 
)

Definition at line 85 of file RectangularGeometry.f90.

86  ! -- modules
87  use constantsmodule, only: dtwo, dpi
88  ! -- return
89  real(DP) :: perimeter_wet
90  ! -- dummy
91  class(RectangularGeometryType) :: this
92  real(DP), intent(in) :: depth
93  !
94  ! -- Calculate area
95  if (depth <= dzero) then
96  perimeter_wet = dzero
97  elseif (depth <= this%height) then
98  perimeter_wet = dtwo * (depth + this%width)
99  else
100  perimeter_wet = dtwo * (this%height + this%width)
101  end if
102  !
103  ! -- Return
104  return

◆ print_attributes()

subroutine rectangulargeometrymodule::print_attributes ( class(rectangulargeometrytype this,
integer(i4b), intent(in)  iout 
)

Definition at line 151 of file RectangularGeometry.f90.

152  ! -- dummy
153  class(RectangularGeometryType) :: this
154  ! -- local
155  integer(I4B), intent(in) :: iout
156  ! -- formats
157  character(len=*), parameter :: fmtnm = "(4x,a,a)"
158  character(len=*), parameter :: fmttd = "(4x,a,1(1PG15.6))"
159  !
160  ! -- call parent to print parent attributes
161  call this%BaseGeometryType%print_attributes(iout)
162  !
163  ! -- Print specifics of this geometry type
164  write (iout, fmttd) 'HEIGHT = ', this%height
165  write (iout, fmttd) 'WIDTH = ', this%width
166  write (iout, fmttd) 'SATURATED AREA = ', this%area_sat()
167  write (iout, fmttd) 'SATURATED WETTED PERIMETER = ', this%perimeter_sat()
168  !
169  ! -- Return
170  return

◆ set_attribute()

subroutine rectangulargeometrymodule::set_attribute ( class(rectangulargeometrytype this,
character(len=*), intent(inout)  line 
)

Definition at line 109 of file RectangularGeometry.f90.

110  ! -- module
111  use inputoutputmodule, only: urword
112  use constantsmodule, only: linelength
114  ! -- dummy
115  class(RectangularGeometryType) :: this
116  character(len=LINELENGTH) :: errmsg
117  character(len=*), intent(inout) :: line
118  ! -- local
119  integer(I4B) :: lloc, istart, istop, ival
120  real(DP) :: rval
121  !
122  ! -- should change this and set id if uninitialized or store it
123  lloc = 1
124  call urword(line, lloc, istart, istop, 2, ival, rval, 0, 0)
125  this%id = ival
126  !
127  ! -- Parse the attribute
128  call urword(line, lloc, istart, istop, 1, ival, rval, 0, 0)
129  select case (line(istart:istop))
130  case ('NAME')
131  call urword(line, lloc, istart, istop, 1, ival, rval, 0, 0)
132  this%name = line(istart:istop)
133  case ('HEIGHT')
134  call urword(line, lloc, istart, istop, 3, ival, rval, 0, 0)
135  this%height = rval
136  case ('WIDTH')
137  call urword(line, lloc, istart, istop, 3, ival, rval, 0, 0)
138  this%width = rval
139  case default
140  write (errmsg, '(a,a)') &
141  'Unknown rectangular geometry attribute: ', line(istart:istop)
142  call store_error(errmsg, terminate=.true.)
143  end select
144  !
145  ! -- Return
146  return
integer(i4b), parameter linelength
maximum length of a standard line
Definition: Constants.f90:44
subroutine, public urword(line, icol, istart, istop, ncode, n, r, iout, in)
Extract a word from a string.
This module contains simulation methods.
Definition: Sim.f90:10
subroutine, public store_error(msg, terminate)
Store an error message.
Definition: Sim.f90:92
integer(i4b) function, public count_errors()
Return number of errors.
Definition: Sim.f90:59
Here is the call graph for this function: