20 integer(I4B),
pointer :: m1id => null()
21 integer(I4B),
pointer :: m2id => null()
43 character(len=*),
intent(in) :: filename
44 integer(I4B),
intent(in) :: id
45 integer(I4B),
intent(in) :: m1id
46 integer(I4B),
intent(in) :: m2id
50 character(len=20) :: cint
54 baseexchange => exchange
59 write (cint,
'(i0)') id
60 exchange%name =
'GWF-PRT_'//trim(adjustl(cint))
61 exchange%memoryPath = exchange%name
64 call exchange%allocate_scalars()
71 call exchange%set_model_pointers()
101 if (.not.
associated(gwfmodel))
then
102 write (
errmsg,
'(3a)')
'Problem with GWF-PRT exchange ', trim(this%name), &
103 '. Specified GWF Model does not appear to be of the correct type.'
108 if (.not.
associated(prtmodel))
then
109 write (
errmsg,
'(3a)')
'Problem with GWF-PRT exchange ', trim(this%name), &
110 '. Specified PRT Model does not appear to be of the correct type.'
115 prtmodel%fmi%flows_from_file = .false.
119 prtmodel%fmi%gwfbndlist => gwfmodel%bndlist
134 integer(I4B) :: ngwfpack, ip
135 class(
bndtype),
pointer :: packobj => null()
154 if (gwfmodel%idsoln >= prtmodel%idsoln)
then
155 write (
errmsg,
'(3a)')
'Problem with GWF-PRT exchange ', trim(this%name), &
156 '. The GWF model must be solved by a different solution than the PRT model. &
157 &The IMS specified for GWF must be listed in mfsim.nam &
158 &before the EMS for PRT.'
163 prtmodel%fmi%gwfflowja => gwfmodel%flowja
165 'GWFFLOWJA', prtmodel%fmi%memoryPath, &
166 'FLOWJA', gwfmodel%memoryPath)
170 if (prtmodel%indsp > 0)
then
171 gwfmodel%npf%icalcspdis = 1
175 ngwfpack = gwfmodel%bndlist%Count()
178 call prtmodel%fmi%gwfpackages(ip)%set_auxname(packobj%naux, &
196 character(len=*),
parameter :: fmtdiserr = &
197 "('GWF and PRT Models do not have the same discretization for exchange&
199 & GWF Model has ', i0, ' user nodes and ', i0, ' reduced nodes.&
200 & PRT Model has ', i0, ' user nodes and ', i0, ' reduced nodes.&
201 & Ensure discretization packages, including IDOMAIN, are identical.')"
218 if (prtmodel%dis%nodes /= gwfmodel%dis%nodes .or. &
219 prtmodel%dis%nodesuser /= gwfmodel%dis%nodesuser)
then
220 write (
errmsg, fmtdiserr) trim(this%name), &
221 gwfmodel%dis%nodesuser, &
222 gwfmodel%dis%nodes, &
223 prtmodel%dis%nodesuser, &
229 prtmodel%fmi%gwfhead => gwfmodel%x
231 'GWFHEAD', prtmodel%fmi%memoryPath, &
232 'X', gwfmodel%memoryPath)
233 prtmodel%fmi%gwfsat => gwfmodel%npf%sat
235 'GWFSAT', prtmodel%fmi%memoryPath, &
236 'SAT', gwfmodel%npf%memoryPath)
237 prtmodel%fmi%gwfspdis => gwfmodel%npf%spdis
239 'GWFSPDIS', prtmodel%fmi%memoryPath, &
240 'SPDIS', gwfmodel%npf%memoryPath)
244 if (prtmodel%inmst > 0)
then
245 if (gwfmodel%insto > 0)
then
246 prtmodel%fmi%gwfstrgss => gwfmodel%sto%strgss
247 prtmodel%fmi%igwfstrgss = 1
248 if (gwfmodel%sto%iusesy == 1)
then
249 prtmodel%fmi%gwfstrgsy => gwfmodel%sto%strgsy
250 prtmodel%fmi%igwfstrgsy = 1
261 call this%gwfbnd2prtfmi()
264 if (gwfmodel%inmvr /= 0) &
265 prtmodel%fmi%mvrbudobj => gwfmodel%mvr%budobj
307 integer(I4B) :: ngwfpack, ip, iterm, imover
311 class(
bndtype),
pointer :: packobj => null()
329 ngwfpack = gwfmodel%bndlist%Count()
333 call prtmodel%fmi%gwfpackages(iterm)%set_pointers( &
335 packobj%memoryPath, &
336 packobj%input_mempath)
341 imover = packobj%imover
342 if (packobj%isadvpak /= 0) imover = 0
343 if (imover /= 0)
then
344 call prtmodel%fmi%gwfpackages(iterm)%set_pointers( &
346 packobj%memoryPath, &
347 packobj%input_mempath)
subroutine, public addbaseexchangetolist(list, exchange)
Add the exchange object (BaseExchangeType) to a list.
class(basemodeltype) function, pointer, public getbasemodelfromlist(list, idx)
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 lenpackagename
maximum length of the package name
subroutine, public gwfprt_cr(filename, id, m1id, m2id)
Create a new GWF to PRT exchange object.
subroutine gwfbnd2prtfmi(this)
subroutine allocate_scalars(this)
subroutine set_model_pointers(this)
This module defines variable data types.
type(listtype), public basemodellist
type(listtype), public baseexchangelist
This module contains simulation methods.
subroutine, public store_error(msg, terminate)
Store an error message.
This module contains simulation variables.
character(len=maxcharlen) errmsg
error message string
integer(i4b), dimension(:), allocatable model_loc_idx
equals the local index into the basemodel list (-1 when not available)
Highest level model type. All models extend this parent type.
Particle tracking (PRT) model.