From 0ef945cc06aac18517d5ca1825bf1c876e843633 Mon Sep 17 00:00:00 2001 From: lewisgross1296 Date: Thu, 18 Aug 2022 14:55:56 -0500 Subject: [PATCH 1/2] removing set_strides() from tally.cpp causes issues, but it should be fine to add in openmc_simulation_init() and in there should occur before init_results. this is because init_results use n_filter_bins_ which is modified by set_strides() --- src/simulation.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/simulation.cpp b/src/simulation.cpp index b70535c3303..d7292cb9d9c 100644 --- a/src/simulation.cpp +++ b/src/simulation.cpp @@ -97,6 +97,7 @@ int openmc_simulation_init() // Allocate tally results arrays if they're not allocated yet for (auto& t : model::tallies) { + t->set_strides(); t->init_results(); } From dc6e2266fb5a57265fa7f46751aee80f0bd0139c Mon Sep 17 00:00:00 2001 From: lewisgross1296 Date: Tue, 23 Aug 2022 16:57:34 -0500 Subject: [PATCH 2/2] removed set_strides() from set_filters(). determined my tests were weird locally and this was not causing them to fail --- src/tallies/tally.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/tallies/tally.cpp b/src/tallies/tally.cpp index 59adce455dc..11d5b245f68 100644 --- a/src/tallies/tally.cpp +++ b/src/tallies/tally.cpp @@ -374,9 +374,6 @@ void Tally::set_filters(gsl::span filters) delayedgroup_filter_ = i; } } - - // Set the strides. - set_strides(); } void Tally::set_strides()