Skip to content

Commit

Permalink
fix(GwfGwtExchange): check node counts before comparison (#1478)
Browse files Browse the repository at this point in the history
  • Loading branch information
wpbonelli authored Dec 5, 2023
1 parent 4185096 commit 7d0dc9c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/Exchange/GwfGwtExchange.f90
Original file line number Diff line number Diff line change
Expand Up @@ -356,11 +356,15 @@ subroutine gwfconn2gwtconn(this, gwfModel, gwtModel)
!
if (associated(gwfEx%model1, gwfModel) .or. &
associated(gwfEx%model2, gwfModel)) then
! again, connecting the same nodes nrs will be

! check exchanges have same node counts
areEqual = size(gwfEx%nodem1) == size(gwtConn%prim_exchange%nodem1)
! then, connecting the same nodes nrs will be
! sufficient evidence of equality
areEqual = all(gwfEx%nodem1 == gwtConn%prim_exchange%nodem1)
areEqual = areEqual .and. &
all(gwfEx%nodem2 == gwtConn%prim_exchange%nodem2)
if (areEqual) &
areEqual = all(gwfEx%nodem1 == gwtConn%prim_exchange%nodem1)
if (areEqual) &
areEqual = all(gwfEx%nodem2 == gwtConn%prim_exchange%nodem2)
if (areEqual) then
! link exchange to connection
write (iout, '(/6a)') 'Linking exchange ', &
Expand Down

0 comments on commit 7d0dc9c

Please sign in to comment.