294 class(GwfGwtExchangeType) :: this
295 type(GwfModelType),
pointer :: gwfModel
296 type(GwtModelType),
pointer :: gwtModel
298 class(SpatialModelConnectionType),
pointer :: conn => null()
299 class(*),
pointer :: objPtr => null()
300 class(GwtGwtConnectionType),
pointer :: gwtConn => null()
301 class(GwfGwfConnectionType),
pointer :: gwfConn => null()
302 class(GwfExchangeType),
pointer :: gwfEx => null()
303 integer(I4B) :: ic1, ic2, iex
304 integer(I4B) :: gwfConnIdx, gwfExIdx
305 logical(LGP) :: areEqual
308 gwtloop:
do ic1 = 1, baseconnectionlist%Count()
310 conn => get_smc_from_list(baseconnectionlist, ic1)
311 if (.not.
associated(conn%owner, gwtmodel)) cycle gwtloop
315 gwtconn => castasgwtgwtconnection(objptr)
320 gwfloop:
do ic2 = 1, baseconnectionlist%Count()
321 conn => get_smc_from_list(baseconnectionlist, ic2)
323 if (
associated(conn%owner, gwfmodel))
then
325 gwfconn => castasgwfgwfconnection(objptr)
329 areequal = all(gwfconn%prim_exchange%nodem1 == &
330 gwtconn%prim_exchange%nodem1)
331 areequal = areequal .and. all(gwfconn%prim_exchange%nodem2 == &
332 gwtconn%prim_exchange%nodem2)
335 write (
iout,
'(/6a)')
'Linking exchange ', &
336 trim(gwtconn%prim_exchange%name), &
337 ' to ', trim(gwfconn%prim_exchange%name), &
338 ' (using interface model) for GWT model ', &
341 call this%link_connections(gwtconn, gwfconn)
349 if (gwfconnidx == -1)
then
350 gwfloopexg:
do iex = 1, baseexchangelist%Count()
351 gwfex => getgwfexchangefromlist(baseexchangelist, iex)
355 if (.not.
associated(gwfex)) cycle gwfloopexg
357 if (
associated(gwfex%model1, gwfmodel) .or. &
358 associated(gwfex%model2, gwfmodel))
then
361 areequal =
size(gwfex%nodem1) ==
size(gwtconn%prim_exchange%nodem1)
365 areequal = all(gwfex%nodem1 == gwtconn%prim_exchange%nodem1)
367 areequal = all(gwfex%nodem2 == gwtconn%prim_exchange%nodem2)
370 write (
iout,
'(/6a)')
'Linking exchange ', &
371 trim(gwtconn%prim_exchange%name), &
372 ' to ', trim(gwfex%name),
' for GWT model ', &
375 if (gwtconn%owns_exchange)
then
376 gwtconn%gwtExchange%gwfsimvals => gwfex%simvals
378 'GWFSIMVALS', gwtconn%gwtExchange%memoryPath, &
379 'SIMVALS', gwfex%memoryPath)
383 if (gwfex%inmvr > 0)
then
384 if (gwtconn%owns_exchange)
then
386 call gwtconn%gwtExchange%mvt%set_pointer_mvrbudobj( &
391 if (
associated(gwfex%model2, gwfmodel)) gwtconn%exgflowSign = -1
392 gwtconn%gwtInterfaceModel%fmi%flows_from_file = .false.
401 if (gwfconnidx == -1 .and. gwfexidx == -1)
then
403 write (errmsg,
'(/6a)')
'Missing GWF-GWF exchange when connecting GWT'// &
404 ' model ', trim(gwtmodel%name),
' with exchange ', &
405 trim(gwtconn%prim_exchange%name),
' to GWF model ', &
This module contains simulation methods.
subroutine, public store_error(msg, terminate)
Store an error message.
This module contains simulation variables.
integer(i4b) iout
file unit number for simulation output