20 character(len=LINELENGTH),
pointer :: filename => null()
21 integer(I4B),
pointer :: neq => null()
22 integer(I4B),
pointer :: nja => null()
23 integer(I4B),
pointer :: moffset => null()
24 integer(I4B),
pointer :: icnvg => null()
25 integer(I4B),
dimension(:),
pointer,
contiguous :: ia => null()
26 integer(I4B),
dimension(:),
pointer,
contiguous :: ja => null()
27 real(dp),
dimension(:),
pointer,
contiguous :: x => null()
28 real(dp),
dimension(:),
pointer,
contiguous :: rhs => null()
29 real(dp),
dimension(:),
pointer,
contiguous :: cond => null()
30 integer(I4B),
dimension(:),
pointer,
contiguous :: idxglo => null()
31 real(dp),
dimension(:),
pointer,
contiguous :: xold => null()
32 real(dp),
dimension(:),
pointer,
contiguous :: flowja => null()
33 integer(I4B),
dimension(:),
pointer,
contiguous :: ibound => null()
117 class(
bndtype),
pointer :: packobj
120 do ip = 1, this%bndlist%Count()
122 call packobj%bnd_reset()
133 integer(I4B),
intent(in) :: kiter
136 subroutine model_fc(this, kiter, matrix_sln, inwtflag)
138 integer(I4B),
intent(in) :: kiter
140 integer(I4B),
intent(in) :: inwtflag
145 integer(I4B),
intent(inout) :: iptc
152 integer(I4B),
intent(inout) :: iptc
153 real(DP),
intent(inout) :: ptcf
158 integer(I4B),
intent(in) :: kiter
160 integer(I4B),
intent(in) :: inwtflag
163 subroutine model_cc(this, innertot, kiter, iend, icnvgmod, cpak, ipak, dpak)
165 integer(I4B),
intent(in) :: innertot
166 integer(I4B),
intent(in) :: kiter
167 integer(I4B),
intent(in) :: iend
168 integer(I4B),
intent(in) :: icnvgmod
169 character(len=LENPAKLOC),
intent(inout) :: cpak
170 integer(I4B),
intent(inout) :: ipak
171 real(DP),
intent(inout) :: dpak
174 subroutine model_nur(this, neqmod, x, xtemp, dx, inewtonur, dxmax, locmax)
176 integer(I4B),
intent(in) :: neqmod
177 real(DP),
dimension(neqmod),
intent(inout) :: x
178 real(DP),
dimension(neqmod),
intent(in) :: xtemp
179 real(DP),
dimension(neqmod),
intent(inout) :: dx
180 integer(I4B),
intent(inout) :: inewtonur
181 real(DP),
intent(inout) :: dxmax
182 integer(I4B),
intent(inout) :: locmax
187 integer(I4B),
intent(in) :: icnvg
188 integer(I4B),
intent(in) :: isuppress_output
193 integer(I4B),
intent(in) :: icnvg
194 integer(I4B),
intent(in) :: isuppress_output
199 integer(I4B),
intent(in) :: icnvg
204 integer(I4B),
intent(in) :: icnvg
213 real(DP),
dimension(:, :),
intent(in) :: budterm
214 character(len=LENBUDTXT),
dimension(:),
intent(in) :: budtxt
215 character(len=*),
intent(in) :: rowlabel
232 deallocate (this%filename)
240 call this%bndlist%Clear()
241 deallocate (this%bndlist)
249 call this%BaseModelType%model_da()
255 integer(I4B),
intent(in) :: moffset
256 this%moffset = moffset
261 integer(I4B),
intent(inout) :: mstart
262 integer(I4B),
intent(inout) :: mend
263 mstart = this%moffset + 1
264 mend = mstart + this%neq - 1
269 integer(I4B),
intent(in) :: id
276 character(len=*),
intent(in) :: modelname
279 call this%BaseModelType%allocate_scalars(modelname)
285 call mem_allocate(this%moffset,
'MOFFSET', this%memoryPath)
286 allocate (this%filename)
287 allocate (this%bndlist)
302 call mem_allocate(this%xold, this%neq,
'XOLD', this%memoryPath)
303 call mem_allocate(this%flowja, this%nja,
'FLOWJA', this%memoryPath)
304 call mem_allocate(this%idxglo, this%nja,
'IDXGLO', this%memoryPath)
307 do i = 1,
size(this%flowja)
308 this%flowja(i) =
dzero
312 subroutine set_xptr(this, xsln, sln_offset, varNameTgt, memPathTgt)
316 real(DP),
dimension(:),
pointer,
contiguous,
intent(in) :: xsln
317 integer(I4B) :: sln_offset
318 character(len=*),
intent(in) :: varNameTgt
319 character(len=*),
intent(in) :: memPathTgt
321 integer(I4B) :: offset
323 offset = this%moffset - sln_offset
324 this%x => xsln(offset + 1:offset + this%neq)
325 call mem_checkin(this%x,
'X', this%memoryPath, varnametgt, mempathtgt)
328 subroutine set_rhsptr(this, rhssln, sln_offset, varNameTgt, memPathTgt)
332 real(DP),
dimension(:),
pointer,
contiguous,
intent(in) :: rhssln
333 integer(I4B) :: sln_offset
334 character(len=*),
intent(in) :: varNameTgt
335 character(len=*),
intent(in) :: memPathTgt
337 integer(I4B) :: offset
339 offset = this%moffset - sln_offset
340 this%rhs => rhssln(offset + 1:offset + this%neq)
341 call mem_checkin(this%rhs,
'RHS', this%memoryPath, varnametgt, mempathtgt)
344 subroutine set_iboundptr(this, iboundsln, sln_offset, varNameTgt, memPathTgt)
348 integer(I4B),
dimension(:),
pointer,
contiguous,
intent(in) :: iboundsln
349 integer(I4B) :: sln_offset
350 character(len=*),
intent(in) :: varNameTgt
351 character(len=*),
intent(in) :: memPathTgt
353 integer(I4B) :: offset
355 offset = this%moffset - sln_offset
356 this%ibound => iboundsln(offset + 1:offset + this%neq)
357 call mem_checkin(this%ibound,
'IBOUND', this%memoryPath, varnametgt, &
364 integer(I4B),
intent(in) :: node
365 character(len=*),
intent(inout) :: mcellid
367 character(len=20) :: cellid
368 integer(I4B) :: ip, ipaknode, istart, istop
369 class(
bndtype),
pointer :: packobj
373 else if (node <= this%dis%nodes)
then
374 call this%dis%noder_to_string(node, cellid)
376 cellid =
'***ERROR***'
377 ipaknode = node - this%dis%nodes
379 do ip = 1, this%bndlist%Count()
381 if (packobj%npakeq == 0) cycle
382 istop = istart + packobj%npakeq - 1
383 if (istart <= ipaknode .and. ipaknode <= istop)
then
384 write (cellid,
'(a, a, a, i0, a, i0, a)')
'(', &
385 trim(packobj%filtyp),
'_', &
386 packobj%ibcnum,
'-', ipaknode - packobj%ioffset,
')'
392 write (mcellid,
'(i0, a, a, a, a)') this%id,
'_', this%macronym,
'-', &
393 trim(adjustl(cellid))
399 integer(I4B),
intent(in) :: node
400 integer(I4B),
intent(inout) :: nodeu
402 if (node <= this%dis%nodes)
then
403 nodeu = this%dis%get_nodeuser(node)
405 nodeu = -(node - this%dis%nodes)
411 integer(I4B) :: iasym
417 class(*),
pointer,
intent(inout) :: obj
421 if (.not.
associated(obj))
return
432 type(
listtype),
intent(inout) :: list
435 class(*),
pointer :: obj
444 type(
listtype),
intent(inout) :: list
445 integer(I4B),
intent(in) :: idx
448 class(*),
pointer :: obj
450 obj => list%GetItem(idx)
460 character(len=*),
intent(inout) :: lst_fname
461 character(len=*),
intent(in) :: model_fname
462 logical(LGP),
intent(in) :: defined
463 character(len=*),
intent(in) :: headertxt
465 integer(I4B) :: i, istart, istop
468 if (.not. defined)
then
473 istop = len_trim(model_fname)
477 if (model_fname(i:i) ==
'.')
then
484 if (istart == 0) istart = istop + 1
487 lst_fname = model_fname(1:istart)
489 lst_fname(istart:istop) =
'.lst'
494 call openfile(this%iout, 0, lst_fname,
'LIST', filstat_opt=
'REPLACE')
This module contains the base boundary package.
class(bndtype) function, pointer, public getbndfromlist(list, idx)
Get boundary from package list.
This module contains simulation constants.
integer(i4b), parameter linelength
maximum length of a standard line
integer(i4b), parameter lenpakloc
maximum length of a package location
real(dp), parameter dzero
real constant zero
integer(i4b), parameter lenbudtxt
maximum length of a budget component names
This module defines variable data types.
subroutine, public addnumericalmodeltolist(list, model)
subroutine model_ac(this, sparse)
subroutine model_df(this)
subroutine model_cc(this, innertot, kiter, iend, icnvgmod, cpak, ipak, dpak)
subroutine model_bdsave(this, icnvg)
subroutine model_ad(this)
subroutine model_solve(this)
subroutine get_mrange(this, mstart, mend)
subroutine model_mc(this, matrix_sln)
class(numericalmodeltype) function, pointer, public getnumericalmodelfromlist(list, idx)
subroutine set_rhsptr(this, rhssln, sln_offset, varNameTgt, memPathTgt)
subroutine model_ar(this)
subroutine model_nr(this, kiter, matrix, inwtflag)
subroutine set_idsoln(this, id)
subroutine get_mnodeu(this, node, nodeu)
subroutine model_nur(this, neqmod, x, xtemp, dx, inewtonur, dxmax, locmax)
subroutine model_cq(this, icnvg, isuppress_output)
subroutine model_da(this)
subroutine model_bd(this, icnvg, isuppress_output)
subroutine model_bdcalc(this, icnvg)
subroutine model_fp(this)
subroutine get_mcellid(this, node, mcellid)
subroutine model_reset(this)
class(numericalmodeltype) function, pointer castasnumericalmodelclass(obj)
subroutine model_ptc(this, vec_residual, iptc, ptcf)
subroutine set_moffset(this, moffset)
subroutine model_ptcchk(this, iptc)
subroutine create_lstfile(this, lst_fname, model_fname, defined, headertxt)
subroutine allocate_arrays(this)
integer(i4b) function get_iasym(this)
subroutine allocate_scalars(this, modelname)
subroutine set_iboundptr(this, iboundsln, sln_offset, varNameTgt, memPathTgt)
subroutine model_fc(this, kiter, matrix_sln, inwtflag)
subroutine model_ot(this)
subroutine model_cf(this, kiter)
subroutine set_xptr(this, xsln, sln_offset, varNameTgt, memPathTgt)
subroutine model_bdentry(this, budterm, budtxt, rowlabel)
subroutine model_rp(this)
This module contains version information.
subroutine write_listfile_header(iout, cmodel_type, write_sys_command, write_kind_info)
@ brief Write program header
Highest level model type. All models extend this parent type.
A generic heterogeneous doubly-linked list.