From 55d4de3b856a02478a21a10e1c38b805d890e02e Mon Sep 17 00:00:00 2001 From: David A Minton Date: Mon, 23 Aug 2021 20:32:08 -0400 Subject: [PATCH 1/2] Fixed bug that was incorrectly setting status flags on encounter spills --- src/util/util_spill.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/util_spill.f90 b/src/util/util_spill.f90 index ccc494474..6cff74d42 100644 --- a/src/util/util_spill.f90 +++ b/src/util/util_spill.f90 @@ -316,7 +316,7 @@ module subroutine util_spill_encounter(self, discards, lspill_list, ldestructive ! Therefore we need to set the nenc values for both the keeps and discareds discards%nenc = count(lspill_list(:)) keeps%nenc = count(.not.lspill_list(:)) - if (keeps%nenc > size(keeps%status)) keeps%status(keeps%nenc+1:size(keeps%status)) = INACTIVE + if (size(keeps%status) > keeps%nenc) keeps%status(keeps%nenc+1:size(keeps%status)) = INACTIVE end associate return From 3a1e58ce5112bd932cb7e05ce542bfed71a0343c Mon Sep 17 00:00:00 2001 From: David A Minton Date: Mon, 23 Aug 2021 22:37:02 -0400 Subject: [PATCH 2/2] Removed problematic status updates from spill methods --- src/util/util_spill.f90 | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/util/util_spill.f90 b/src/util/util_spill.f90 index 6cff74d42..63cce317a 100644 --- a/src/util/util_spill.f90 +++ b/src/util/util_spill.f90 @@ -281,7 +281,6 @@ module subroutine util_spill_body(self, discards, lspill_list, ldestructive) ! Therefore we need to set the nbody values for both the keeps and discareds discards%nbody = count(lspill_list(:)) keeps%nbody = keeps%nbody - discards%nbody - if (keeps%nbody > size(keeps%status)) keeps%status(keeps%nbody+1:size(keeps%status)) = INACTIVE end associate return @@ -316,7 +315,6 @@ module subroutine util_spill_encounter(self, discards, lspill_list, ldestructive ! Therefore we need to set the nenc values for both the keeps and discareds discards%nenc = count(lspill_list(:)) keeps%nenc = count(.not.lspill_list(:)) - if (size(keeps%status) > keeps%nenc) keeps%status(keeps%nenc+1:size(keeps%status)) = INACTIVE end associate return