17 character(len=LENFTYPE) ::
ftype =
'SRC'
18 character(len=16) ::
text =
' SRC'
22 character(len=LENVARNAME) :: depvartype =
''
24 logical(LGP),
pointer :: highest_sat => null()
25 real(dp),
dimension(:),
pointer,
contiguous :: smassrate => null()
26 integer(I4B),
dimension(:),
pointer,
contiguous :: nodesontop => null()
53 subroutine src_create(packobj, id, ibcnum, inunit, iout, namemodel, &
54 depvartype, pakname, input_mempath, fmi)
58 class(
bndtype),
pointer :: packobj
59 integer(I4B),
intent(in) :: id
60 integer(I4B),
intent(in) :: ibcnum
61 integer(I4B),
intent(in) :: inunit
62 integer(I4B),
intent(in) ::
iout
63 character(len=*),
intent(in) :: namemodel
64 character(len=*),
intent(in) :: pakname
65 character(len=LENVARNAME),
intent(in) :: depvartype
66 character(len=*),
intent(in) :: input_mempath
76 call packobj%set_names(ibcnum, namemodel, pakname,
ftype, input_mempath)
80 call srcobj%allocate_scalars()
83 call packobj%pack_initialize()
85 packobj%inunit = inunit
88 packobj%ibcnum = ibcnum
93 srcobj%depvartype = depvartype
112 call this%BndExtType%source_options()
115 call mem_set_value(this%highest_sat,
'HIGHEST_SAT', this%input_mempath, &
118 write (this%iout,
'(/1x,a)')
'PROCESSING SRC OPTIONS'
119 if (found%highest_sat)
then
120 write (this%iout,
'(4x,a)') &
121 'Mass source loading rate will be applied to the highest cell at or below &
122 &the specified cellid with a non-zero saturation.'
124 write (this%iout,
'(1x,a)')
'END OF SRC OPTIONS'
136 call this%BndExtType%bnd_da()
140 if (this%highest_sat)
then
141 call mem_deallocate(this%nodesontop,
"NODESONTOP", this%memoryPath)
158 call this%BndExtType%allocate_scalars()
161 call mem_allocate(this%highest_sat,
'HIGHEST_SAT', this%memoryPath)
164 this%highest_sat = .false.
176 integer(I4B),
dimension(:),
pointer,
contiguous,
optional :: nodelist
177 real(DP),
dimension(:, :),
pointer,
contiguous,
optional :: auxvar
182 call this%BndExtType%allocate_arrays(nodelist, auxvar)
185 if (this%highest_sat)
then
186 call mem_allocate(this%nodesontop, this%maxbound,
'NODESONTOP', &
191 call mem_setptr(this%smassrate,
'SMASSRATE', this%input_mempath)
194 call mem_checkin(this%smassrate,
'SMASSRATE', this%memoryPath, &
195 'SMASSRATE', this%input_mempath)
198 if (this%highest_sat)
then
199 do n = 1, this%maxbound
200 this%nodesontop(n) = 0
211 if (this%iper /=
kper)
return
213 call this%BndExtType%bnd_rp()
215 if (this%highest_sat)
call this%set_nodesontop()
233 do n = 1, this%nbound
234 this%nodesontop(n) = this%nodelist(n)
248 integer(I4B) :: i, node
252 if (this%nbound == 0)
return
255 do i = 1, this%nbound
258 if (this%highest_sat)
then
259 node = this%nodesontop(i)
261 node = this%nodelist(i)
265 if (this%highest_sat)
then
266 if (this%fmi%gwfsat(node) == 0) &
267 call this%dis%highest_saturated(node, this%fmi%gwfsat)
268 this%nodelist(i) = node
272 if (this%ibound(node) <= 0)
then
278 q = this%mass_mult(i)
288 subroutine src_fc(this, rhs, ia, idxglo, matrix_sln)
291 real(DP),
dimension(:),
intent(inout) :: rhs
292 integer(I4B),
dimension(:),
intent(in) :: ia
293 integer(I4B),
dimension(:),
intent(in) :: idxglo
296 integer(I4B) :: i, n, ipos
299 if (this%imover == 1)
then
300 call this%pakmvrobj%fc()
304 do i = 1, this%nbound
306 rhs(n) = rhs(n) + this%rhs(i)
308 call matrix_sln%add_value_pos(idxglo(ipos), this%hcof(i))
312 if (this%imover == 1 .and. this%rhs(i) >
dzero)
then
313 call this%pakmvrobj%accumulate_qformvr(i, this%rhs(i))
329 this%listlabel = trim(this%filtyp)//
' NO.'
330 if (this%dis%ndim == 3)
then
331 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'LAYER'
332 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'ROW'
333 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'COL'
334 elseif (this%dis%ndim == 2)
then
335 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'LAYER'
336 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'CELL2D'
338 write (this%listlabel,
'(a, a7)') trim(this%listlabel),
'NODE'
340 write (this%listlabel,
'(a, a16)') trim(this%listlabel),
'STRESS RATE'
341 if (this%inamedbound == 1)
then
342 write (this%listlabel,
'(a, a16)') trim(this%listlabel),
'BOUNDARY NAME'
374 call this%obs%StoreObsType(
'src', .true., indx)
379 call this%obs%StoreObsType(
'to-mvr', .true., indx)
393 integer(I4B),
intent(in) :: col
394 integer(I4B),
intent(in) :: row
400 bndval = this%smassrate(row)
415 integer(I4B),
intent(in) :: row
419 if (this%iauxmultcol > 0)
then
420 ener = this%smassrate(row) * this%auxvar(this%iauxmultcol, row)
422 ener = this%smassrate(row)
This module contains the extended boundary package.
real(dp) function bound_value(this, col, row)
Return a bound value.
subroutine source_options(this)
Source package options from input context.
This module contains the base boundary package.
This module contains simulation constants.
real(dp), parameter dem1
real constant 1e-1
integer(i4b), parameter lenvarname
maximum length of a variable name
integer(i4b), parameter lenftype
maximum length of a package type (DIS, WEL, OC, etc.)
real(dp), parameter dzero
real constant zero
real(dp), parameter done
real constant 1
subroutine, public src_create(packobj, id, ibcnum, inunit, iout, namemodel, depvartype, pakname, input_mempath, fmi)
Create a source loading package.
character(len=lenftype) ftype
subroutine src_fc(this, rhs, ia, idxglo, matrix_sln)
Add matrix terms related to specified mass source loading.
subroutine src_cf(this)
Formulate the HCOF and RHS terms.
subroutine src_allocate_arrays(this, nodelist, auxvar)
Allocate arrays.
subroutine src_options(this)
Set additional options specific to the GwtSrcType.
subroutine set_nodesontop(this)
Store nodelist in nodesontop.
subroutine src_allocate_scalars(this)
Allocate scalars.
subroutine src_da(this)
Deallocate memory.
subroutine define_listlabel(this)
Define list labels.
real(dp) function mass_mult(this, row)
Return a value that applies a multiplier.
subroutine src_df_obs(this)
Define observations.
real(dp) function src_bound_value(this, col, row)
Return a bound value.
logical function src_obs_supported(this)
Support function for specified mass source loading observations.
This module defines variable data types.
This module contains the derived type ObsType.
subroutine, public defaultobsidprocessor(obsrv, dis, inunitobs, iout)
Process IDstring provided for each observation.
subroutine allocate_scalars(this)
Allocate observation scalars.
This module contains simulation methods.
subroutine, public store_error(msg, terminate)
Store an error message.
integer(i4b) function, public count_errors()
Return number of errors.
subroutine, public store_error_filename(filename, terminate)
Store the erroring file name.
This module contains simulation variables.
character(len=maxcharlen) errmsg
error message string
integer(i4b) iout
file unit number for simulation output
integer(i4b), pointer, public kper
current stress period number
This class is used to store a single deferred-length character string. It was designed to work in an ...
subroutine allocate_arrays(this)
allocate memory for arrays