185
190
191 class(GwfGwtExchangeType) :: this
192
193 class(BaseModelType), pointer :: mb => null()
194 type(GwfModelType), pointer :: gwfmodel => null()
195 type(GwtModelType), pointer :: gwtmodel => null()
196
197 character(len=*), parameter :: fmtdiserr = &
198 "('GWF and GWT Models do not have the same discretization for exchange&
199 & ',a,'.&
200 & GWF Model has ', i0, ' user nodes and ', i0, ' reduced nodes.&
201 & GWT Model has ', i0, ' user nodes and ', i0, ' reduced nodes.&
202 & Ensure discretization packages, including IDOMAIN, are identical.')"
203 character(len=*), parameter :: fmtidomerr = &
204 "('GWF and GWT Models do not have the same discretization for exchange&
205 & ',a,'.&
206 & GWF Model and GWT Model have different IDOMAIN arrays.&
207 & Ensure discretization packages, including IDOMAIN, are identical.')"
208
209
210 mb => getbasemodelfromlist(basemodellist, this%m1_idx)
211 select type (mb)
212 type is (gwfmodeltype)
213 gwfmodel => mb
214 end select
215
216
217 mb => getbasemodelfromlist(basemodellist, this%m2_idx)
218 select type (mb)
219 type is (gwtmodeltype)
220 gwtmodel => mb
221 end select
222
223
224 if (gwtmodel%dis%nodes /= gwfmodel%dis%nodes .or. &
225 gwtmodel%dis%nodesuser /= gwfmodel%dis%nodesuser) then
226 write (errmsg, fmtdiserr) trim(this%name), &
227 gwfmodel%dis%nodesuser, &
228 gwfmodel%dis%nodes, &
229 gwtmodel%dis%nodesuser, &
230 gwtmodel%dis%nodes
231 call store_error(errmsg, terminate=.true.)
232 end if
233
234
235 select type (gwfdis => gwfmodel%dis)
237 select type (gwtdis => gwtmodel%dis)
239 if (.not. all(gwfdis%idomain == gwtdis%idomain)) then
240 write (errmsg, fmtidomerr) trim(this%name)
241 call store_error(errmsg, terminate=.true.)
242 end if
243 end select
245 select type (gwtdis => gwtmodel%dis)
247 if (.not. all(gwfdis%idomain == gwtdis%idomain)) then
248 write (errmsg, fmtidomerr) trim(this%name)
249 call store_error(errmsg, terminate=.true.)
250 end if
251 end select
253 select type (gwtdis => gwtmodel%dis)
255 if (.not. all(gwfdis%idomain == gwtdis%idomain)) then
256 write (errmsg, fmtidomerr) trim(this%name)
257 call store_error(errmsg, terminate=.true.)
258 end if
259 end select
260 end select
261
262
263 gwtmodel%fmi%gwfhead => gwfmodel%x
265 'GWFHEAD', gwtmodel%fmi%memoryPath, &
266 'X', gwfmodel%memoryPath)
267 gwtmodel%fmi%gwfsat => gwfmodel%npf%sat
269 'GWFSAT', gwtmodel%fmi%memoryPath, &
270 'SAT', gwfmodel%npf%memoryPath)
271 gwtmodel%fmi%gwfspdis => gwfmodel%npf%spdis
273 'GWFSPDIS', gwtmodel%fmi%memoryPath, &
274 'SPDIS', gwfmodel%npf%memoryPath)
275 gwtmodel%fmi%igwfspdis = gwfmodel%npf%icalcspdis
276
277
278
279 if (gwtmodel%inmst > 0) then
280 if (gwfmodel%insto > 0) then
281 gwtmodel%fmi%gwfstrgss => gwfmodel%sto%strgss
282 gwtmodel%fmi%igwfstrgss = 1
283 if (gwfmodel%sto%iusesy == 1) then
284 gwtmodel%fmi%gwfstrgsy => gwfmodel%sto%strgsy
285 gwtmodel%fmi%igwfstrgsy = 1
286 end if
287 end if
288 end if
289
290
291 if (gwfmodel%inbuy > 0) then
292 call gwfmodel%buy%set_concentration_pointer(gwtmodel%name, gwtmodel%x, &
293 gwtmodel%ibound)
294 end if
295
296
297 if (gwfmodel%invsc > 0) then
298 call gwfmodel%vsc%set_concentration_pointer(gwtmodel%name, gwtmodel%x, &
299 gwtmodel%ibound)
300 end if
301
302
303 call this%gwfbnd2gwtfmi()
304
305
306 if (gwfmodel%inmvr /= 0) then
307 gwtmodel%fmi%mvrbudobj => gwfmodel%mvr%budobj
308 end if
309
310
311 call this%gwfconn2gwtconn(gwfmodel, gwtmodel)
Structured grid discretization.
Unstructured grid discretization.
Vertex grid discretization.