294 class(GwfGweExchangeType) :: this
295 type(GwfModelType),
pointer :: gwfModel
296 type(GweModelType),
pointer :: gweModel
298 class(SpatialModelConnectionType),
pointer :: conn => null()
299 class(*),
pointer :: objPtr => null()
300 class(GweGweConnectionType),
pointer :: gweConn => 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 gweloop:
do ic1 = 1, baseconnectionlist%Count()
310 conn => get_smc_from_list(baseconnectionlist, ic1)
311 if (.not.
associated(conn%owner, gwemodel)) cycle gweloop
315 gweconn => castasgwegweconnection(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 gweconn%prim_exchange%nodem1)
331 areequal = areequal .and. all(gwfconn%prim_exchange%nodem2 == &
332 gweconn%prim_exchange%nodem2)
335 write (
iout,
'(/6a)')
'Linking exchange ', &
336 trim(gweconn%prim_exchange%name), &
337 ' to ', trim(gwfconn%prim_exchange%name), &
338 ' (using interface model) for GWE model ', &
341 call this%link_connections(gweconn, 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(gweconn%prim_exchange%nodem1)
365 areequal = all(gwfex%nodem1 == gweconn%prim_exchange%nodem1)
367 areequal = all(gwfex%nodem2 == gweconn%prim_exchange%nodem2)
370 write (
iout,
'(/6a)')
'Linking exchange ', &
371 trim(gweconn%prim_exchange%name), &
372 ' to ', trim(gwfex%name),
' for GWE model ', &
375 if (gweconn%owns_exchange)
then
376 gweconn%gweExchange%gwfsimvals => gwfex%simvals
378 'GWFSIMVALS', gweconn%gweExchange%memoryPath, &
379 'SIMVALS', gwfex%memoryPath)
383 if (gwfex%inmvr > 0)
then
384 if (gweconn%owns_exchange)
then
386 call gweconn%gweExchange%mvt%set_pointer_mvrbudobj( &
391 if (
associated(gwfex%model2, gwfmodel)) gweconn%exgflowSign = -1
392 gweconn%gweInterfaceModel%fmi%flows_from_file = .false.
401 if (gwfconnidx == -1 .and. gwfexidx == -1)
then
403 write (errmsg,
'(/6a)')
'Missing GWF-GWF exchange when connecting GWE'// &
404 ' model ', trim(gwemodel%name),
' with exchange ', &
405 trim(gweconn%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