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()
118 class(
bndtype),
pointer :: packobj
121 do ip = 1, this%bndlist%Count()
123 call packobj%bnd_reset()
134 integer(I4B),
intent(in) :: kiter
137 subroutine model_fc(this, kiter, matrix_sln, inwtflag)
139 integer(I4B),
intent(in) :: kiter
141 integer(I4B),
intent(in) :: inwtflag
146 integer(I4B),
intent(inout) :: iptc
153 integer(I4B),
intent(inout) :: iptc
154 real(DP),
intent(inout) :: ptcf
159 integer(I4B),
intent(in) :: kiter
161 integer(I4B),
intent(in) :: inwtflag
164 subroutine model_cc(this, innertot, kiter, iend, icnvgmod, cpak, ipak, dpak)
166 integer(I4B),
intent(in) :: innertot
167 integer(I4B),
intent(in) :: kiter
168 integer(I4B),
intent(in) :: iend
169 integer(I4B),
intent(in) :: icnvgmod
170 character(len=LENPAKLOC),
intent(inout) :: cpak
171 integer(I4B),
intent(inout) :: ipak
172 real(DP),
intent(inout) :: dpak
175 subroutine model_nur(this, neqmod, x, xtemp, dx, inewtonur, dxmax, locmax)
177 integer(I4B),
intent(in) :: neqmod
178 real(DP),
dimension(neqmod),
intent(inout) :: x
179 real(DP),
dimension(neqmod),
intent(in) :: xtemp
180 real(DP),
dimension(neqmod),
intent(inout) :: dx
181 integer(I4B),
intent(inout) :: inewtonur
182 real(DP),
intent(inout) :: dxmax
183 integer(I4B),
intent(inout) :: locmax
188 integer(I4B),
intent(in) :: icnvg
189 integer(I4B),
intent(in) :: isuppress_output
194 integer(I4B),
intent(in) :: icnvg
195 integer(I4B),
intent(in) :: isuppress_output
200 integer(I4B),
intent(in) :: icnvg
205 integer(I4B),
intent(in) :: icnvg
214 real(DP),
dimension(:, :),
intent(in) :: budterm
215 character(len=LENBUDTXT),
dimension(:),
intent(in) :: budtxt
216 character(len=*),
intent(in) :: rowlabel
233 deallocate (this%filename)
241 call this%bndlist%Clear()
242 deallocate (this%bndlist)
250 call this%BaseModelType%model_da()
256 integer(I4B),
intent(in) :: moffset
257 this%moffset = moffset
262 integer(I4B),
intent(inout) :: mstart
263 integer(I4B),
intent(inout) :: mend
264 mstart = this%moffset + 1
265 mend = mstart + this%neq - 1
270 integer(I4B),
intent(in) :: id
277 character(len=*),
intent(in) :: modelname
280 call this%BaseModelType%allocate_scalars(modelname)
286 call mem_allocate(this%moffset,
'MOFFSET', this%memoryPath)
287 allocate (this%filename)
288 allocate (this%bndlist)
303 call mem_allocate(this%xold, this%neq,
'XOLD', this%memoryPath)
304 call mem_allocate(this%flowja, this%nja,
'FLOWJA', this%memoryPath)
305 call mem_allocate(this%idxglo, this%nja,
'IDXGLO', this%memoryPath)
308 do i = 1,
size(this%flowja)
309 this%flowja(i) =
dzero
313 subroutine set_xptr(this, xsln, sln_offset, varNameTgt, memPathTgt)
317 real(DP),
dimension(:),
pointer,
contiguous,
intent(in) :: xsln
318 integer(I4B) :: sln_offset
319 character(len=*),
intent(in) :: varNameTgt
320 character(len=*),
intent(in) :: memPathTgt
322 integer(I4B) :: offset
324 offset = this%moffset - sln_offset
325 this%x => xsln(offset + 1:offset + this%neq)
326 call mem_checkin(this%x,
'X', this%memoryPath, varnametgt, mempathtgt)
329 subroutine set_rhsptr(this, rhssln, sln_offset, varNameTgt, memPathTgt)
333 real(DP),
dimension(:),
pointer,
contiguous,
intent(in) :: rhssln
334 integer(I4B) :: sln_offset
335 character(len=*),
intent(in) :: varNameTgt
336 character(len=*),
intent(in) :: memPathTgt
338 integer(I4B) :: offset
340 offset = this%moffset - sln_offset
341 this%rhs => rhssln(offset + 1:offset + this%neq)
342 call mem_checkin(this%rhs,
'RHS', this%memoryPath, varnametgt, mempathtgt)
345 subroutine set_iboundptr(this, iboundsln, sln_offset, varNameTgt, memPathTgt)
349 integer(I4B),
dimension(:),
pointer,
contiguous,
intent(in) :: iboundsln
350 integer(I4B) :: sln_offset
351 character(len=*),
intent(in) :: varNameTgt
352 character(len=*),
intent(in) :: memPathTgt
354 integer(I4B) :: offset
356 offset = this%moffset - sln_offset
357 this%ibound => iboundsln(offset + 1:offset + this%neq)
358 call mem_checkin(this%ibound,
'IBOUND', this%memoryPath, varnametgt, &
365 integer(I4B),
intent(in) :: node
366 character(len=*),
intent(inout) :: mcellid
368 character(len=20) :: cellid
369 integer(I4B) :: ip, ipaknode, istart, istop
370 class(
bndtype),
pointer :: packobj
374 else if (node <= this%dis%nodes)
then
375 call this%dis%noder_to_string(node, cellid)
377 cellid =
'***ERROR***'
378 ipaknode = node - this%dis%nodes
380 do ip = 1, this%bndlist%Count()
382 if (packobj%npakeq == 0) cycle
383 istop = istart + packobj%npakeq - 1
384 if (istart <= ipaknode .and. ipaknode <= istop)
then
385 write (cellid,
'(a, a, a, i0, a, i0, a)')
'(', &
386 trim(packobj%filtyp),
'_', &
387 packobj%ibcnum,
'-', ipaknode - packobj%ioffset,
')'
393 write (mcellid,
'(i0, a, a, a, a)') this%id,
'_', this%macronym,
'-', &
394 trim(adjustl(cellid))
400 integer(I4B),
intent(in) :: node
401 integer(I4B),
intent(inout) :: nodeu
403 if (node <= this%dis%nodes)
then
404 nodeu = this%dis%get_nodeuser(node)
406 nodeu = -(node - this%dis%nodes)
412 integer(I4B) :: iasym
418 integer(I4B) :: idv_scale
424 class(*),
pointer,
intent(inout) :: obj
428 if (.not.
associated(obj))
return
439 type(
listtype),
intent(inout) :: list
442 class(*),
pointer :: obj
451 type(
listtype),
intent(inout) :: list
452 integer(I4B),
intent(in) :: idx
455 class(*),
pointer :: obj
457 obj => list%GetItem(idx)
467 character(len=*),
intent(inout) :: lst_fname
468 character(len=*),
intent(in) :: model_fname
469 logical(LGP),
intent(in) :: defined
470 character(len=*),
intent(in) :: headertxt
472 integer(I4B) :: i, istart, istop
475 if (.not. defined)
then
480 istop = len_trim(model_fname)
484 if (model_fname(i:i) ==
'.')
then
491 if (istart == 0) istart = istop + 1
494 lst_fname = model_fname(1:istart)
496 lst_fname(istart:istop) =
'.lst'
501 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)
integer(i4b) function get_idv_scale(this)
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.