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()
98 if (.not.
associated(gwfmodel))
then
99 write (
errmsg,
'(3a)')
'Problem with GWF-PRT exchange ', trim(this%name), &
100 '. Specified GWF Model does not appear to be of the correct type.'
105 if (.not.
associated(prtmodel))
then
106 write (
errmsg,
'(3a)')
'Problem with GWF-PRT exchange ', trim(this%name), &
107 '. Specified PRT Model does not appear to be of the correct type.'
112 prtmodel%fmi%flows_from_file = .false.
116 prtmodel%fmi%gwfbndlist => gwfmodel%bndlist
128 integer(I4B) :: ngwfpack, ip
129 class(
bndtype),
pointer :: packobj => null()
148 if (gwfmodel%idsoln >= prtmodel%idsoln)
then
149 write (
errmsg,
'(3a)')
'Problem with GWF-PRT exchange ', trim(this%name), &
150 '. The GWF model must be solved by a different solution than the PRT model. &
151 &The IMS specified for GWF must be listed in mfsim.nam &
152 &before the EMS for PRT.'
157 prtmodel%fmi%gwfflowja => gwfmodel%flowja
159 'GWFFLOWJA', prtmodel%fmi%memoryPath, &
160 'FLOWJA', gwfmodel%memoryPath)
164 if (prtmodel%indsp > 0)
then
165 gwfmodel%npf%icalcspdis = 1
169 ngwfpack = gwfmodel%bndlist%Count()
172 call prtmodel%fmi%gwfpackages(ip)%set_auxname(packobj%naux, &
187 character(len=*),
parameter :: fmtdiserr = &
188 "('GWF and PRT Models do not have the same discretization for exchange&
190 & GWF Model has ', i0, ' user nodes and ', i0, ' reduced nodes.&
191 & PRT Model has ', i0, ' user nodes and ', i0, ' reduced nodes.&
192 & Ensure discretization packages, including IDOMAIN, are identical.')"
209 if (prtmodel%dis%nodes /= gwfmodel%dis%nodes .or. &
210 prtmodel%dis%nodesuser /= gwfmodel%dis%nodesuser)
then
211 write (
errmsg, fmtdiserr) trim(this%name), &
212 gwfmodel%dis%nodesuser, &
213 gwfmodel%dis%nodes, &
214 prtmodel%dis%nodesuser, &
220 prtmodel%fmi%gwfhead => gwfmodel%x
222 'GWFHEAD', prtmodel%fmi%memoryPath, &
223 'X', gwfmodel%memoryPath)
224 prtmodel%fmi%gwfsat => gwfmodel%npf%sat
226 'GWFSAT', prtmodel%fmi%memoryPath, &
227 'SAT', gwfmodel%npf%memoryPath)
228 prtmodel%fmi%gwfspdis => gwfmodel%npf%spdis
230 'GWFSPDIS', prtmodel%fmi%memoryPath, &
231 'SPDIS', gwfmodel%npf%memoryPath)
235 if (prtmodel%inmst > 0)
then
236 if (gwfmodel%insto > 0)
then
237 prtmodel%fmi%gwfstrgss => gwfmodel%sto%strgss
238 prtmodel%fmi%igwfstrgss = 1
239 if (gwfmodel%sto%iusesy == 1)
then
240 prtmodel%fmi%gwfstrgsy => gwfmodel%sto%strgsy
241 prtmodel%fmi%igwfstrgsy = 1
247 call this%gwfbnd2prtfmi()
250 if (gwfmodel%inmvr /= 0) &
251 prtmodel%fmi%mvrbudobj => gwfmodel%mvr%budobj
287 integer(I4B) :: ngwfpack, ip, iterm, imover
291 class(
bndtype),
pointer :: packobj => null()
309 ngwfpack = gwfmodel%bndlist%Count()
313 call prtmodel%fmi%gwfpackages(iterm)%set_pointers( &
315 packobj%memoryPath, &
316 packobj%input_mempath)
321 imover = packobj%imover
322 if (packobj%isadvpak /= 0) imover = 0
323 if (imover /= 0)
then
324 call prtmodel%fmi%gwfpackages(iterm)%set_pointers( &
326 packobj%memoryPath, &
327 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.