282 class(GwfGweExchangeType) :: this
283 type(GwfModelType),
pointer :: gwfModel
284 type(GweModelType),
pointer :: gweModel
286 class(SpatialModelConnectionType),
pointer :: conn => null()
287 class(*),
pointer :: objPtr => null()
288 class(GweGweConnectionType),
pointer :: gweConn => null()
289 class(GwfGwfConnectionType),
pointer :: gwfConn => null()
290 class(GwfExchangeType),
pointer :: gwfEx => null()
291 integer(I4B) :: ic1, ic2, iex
292 integer(I4B) :: gwfConnIdx, gwfExIdx
293 logical(LGP) :: areEqual
296 gweloop:
do ic1 = 1, baseconnectionlist%Count()
298 conn => get_smc_from_list(baseconnectionlist, ic1)
299 if (.not.
associated(conn%owner, gwemodel)) cycle gweloop
303 gweconn => castasgwegweconnection(objptr)
308 gwfloop:
do ic2 = 1, baseconnectionlist%Count()
309 conn => get_smc_from_list(baseconnectionlist, ic2)
311 if (
associated(conn%owner, gwfmodel))
then
313 gwfconn => castasgwfgwfconnection(objptr)
317 areequal = all(gwfconn%prim_exchange%nodem1 == &
318 gweconn%prim_exchange%nodem1)
319 areequal = areequal .and. all(gwfconn%prim_exchange%nodem2 == &
320 gweconn%prim_exchange%nodem2)
323 write (
iout,
'(/6a)')
'Linking exchange ', &
324 trim(gweconn%prim_exchange%name), &
325 ' to ', trim(gwfconn%prim_exchange%name), &
326 ' (using interface model) for GWE model ', &
329 call this%link_connections(gweconn, gwfconn)
337 if (gwfconnidx == -1)
then
338 gwfloopexg:
do iex = 1, baseexchangelist%Count()
339 gwfex => getgwfexchangefromlist(baseexchangelist, iex)
343 if (.not.
associated(gwfex)) cycle gwfloopexg
345 if (
associated(gwfex%model1, gwfmodel) .or. &
346 associated(gwfex%model2, gwfmodel))
then
349 areequal =
size(gwfex%nodem1) ==
size(gweconn%prim_exchange%nodem1)
353 areequal = all(gwfex%nodem1 == gweconn%prim_exchange%nodem1)
355 areequal = all(gwfex%nodem2 == gweconn%prim_exchange%nodem2)
358 write (
iout,
'(/6a)')
'Linking exchange ', &
359 trim(gweconn%prim_exchange%name), &
360 ' to ', trim(gwfex%name),
' for GWE model ', &
363 if (gweconn%owns_exchange)
then
364 gweconn%gweExchange%gwfsimvals => gwfex%simvals
366 'GWFSIMVALS', gweconn%gweExchange%memoryPath, &
367 'SIMVALS', gwfex%memoryPath)
371 if (gwfex%inmvr > 0)
then
372 if (gweconn%owns_exchange)
then
374 call gweconn%gweExchange%mvt%set_pointer_mvrbudobj( &
379 if (
associated(gwfex%model2, gwfmodel)) gweconn%exgflowSign = -1
380 gweconn%gweInterfaceModel%fmi%flows_from_file = .false.
389 if (gwfconnidx == -1 .and. gwfexidx == -1)
then
391 write (errmsg,
'(/6a)')
'Missing GWF-GWF exchange when connecting GWE'// &
392 ' model ', trim(gwemodel%name),
' with exchange ', &
393 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