178
183
184 class(GwfPrtExchangeType) :: this
185
186 class(BaseModelType), pointer :: mb => null()
187 type(GwfModelType), pointer :: gwfmodel => null()
188 type(PrtModelType), pointer :: prtmodel => null()
189
190 character(len=*), parameter :: fmtdiserr = &
191 "('GWF and PRT Models do not have the same discretization for exchange&
192 & ',a,'.&
193 & GWF Model has ', i0, ' user nodes and ', i0, ' reduced nodes.&
194 & PRT Model has ', i0, ' user nodes and ', i0, ' reduced nodes.&
195 & Ensure discretization packages, including IDOMAIN, are identical.')"
196 character(len=*), parameter :: fmtidomerr = &
197 "('GWF and PRT Models do not have the same discretization for exchange&
198 & ',a,'.&
199 & GWF Model and PRT Model have different IDOMAIN arrays.&
200 & Ensure discretization packages, including IDOMAIN, are identical.')"
201
202
203 mb => getbasemodelfromlist(basemodellist, this%m1id)
204 select type (mb)
205 type is (gwfmodeltype)
206 gwfmodel => mb
207 end select
208
209
210 mb => getbasemodelfromlist(basemodellist, this%m2id)
211 select type (mb)
212 type is (prtmodeltype)
213 prtmodel => mb
214 end select
215
216
217 if (prtmodel%dis%nodes /= gwfmodel%dis%nodes .or. &
218 prtmodel%dis%nodesuser /= gwfmodel%dis%nodesuser) then
219 write (errmsg, fmtdiserr) trim(this%name), &
220 gwfmodel%dis%nodesuser, &
221 gwfmodel%dis%nodes, &
222 prtmodel%dis%nodesuser, &
223 prtmodel%dis%nodes
224 call store_error(errmsg, terminate=.true.)
225 end if
226
227
228 select type (gwfdis => gwfmodel%dis)
230 select type (prtdis => prtmodel%dis)
232 if (.not. all(gwfdis%idomain == prtdis%idomain)) then
233 write (errmsg, fmtidomerr) trim(this%name)
234 call store_error(errmsg, terminate=.true.)
235 end if
236 end select
238 select type (prtdis => prtmodel%dis)
240 if (.not. all(gwfdis%idomain == prtdis%idomain)) then
241 write (errmsg, fmtidomerr) trim(this%name)
242 call store_error(errmsg, terminate=.true.)
243 end if
244 end select
246 select type (prtdis => prtmodel%dis)
248 if (.not. all(gwfdis%idomain == prtdis%idomain)) then
249 write (errmsg, fmtidomerr) trim(this%name)
250 call store_error(errmsg, terminate=.true.)
251 end if
252 end select
253 end select
254
255
256 prtmodel%fmi%gwfhead => gwfmodel%x
258 'GWFHEAD', prtmodel%fmi%memoryPath, &
259 'X', gwfmodel%memoryPath)
260 prtmodel%fmi%gwfsat => gwfmodel%npf%sat
262 'GWFSAT', prtmodel%fmi%memoryPath, &
263 'SAT', gwfmodel%npf%memoryPath)
264 prtmodel%fmi%gwfspdis => gwfmodel%npf%spdis
266 'GWFSPDIS', prtmodel%fmi%memoryPath, &
267 'SPDIS', gwfmodel%npf%memoryPath)
268 prtmodel%fmi%igwfceltyp = 1
269 prtmodel%fmi%gwfceltyp => gwfmodel%npf%icelltype
271 'GWFCELTYP', prtmodel%fmi%memoryPath, &
272 'ICELLTYPE', gwfmodel%npf%memoryPath)
273
274
275
276 if (prtmodel%inmst > 0) then
277 if (gwfmodel%insto > 0) then
278 prtmodel%fmi%gwfstrgss => gwfmodel%sto%strgss
279 prtmodel%fmi%igwfstrgss = 1
280 if (gwfmodel%sto%iusesy == 1) then
281 prtmodel%fmi%gwfstrgsy => gwfmodel%sto%strgsy
282 prtmodel%fmi%igwfstrgsy = 1
283 end if
284 end if
285 end if
286
287
288 call this%gwfbnd2prtfmi()
289
290
291 if (gwfmodel%inmvr /= 0) &
292 prtmodel%fmi%mvrbudobj => gwfmodel%mvr%budobj
293
294
Structured grid discretization.
Unstructured grid discretization.
Vertex grid discretization.