From 55e2d4028b0bcb9bdbaf916bef50b61be6d83a61 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Sun, 14 Apr 2024 14:07:06 -0400 Subject: [PATCH] fix zero of burn_weights in retry we only need to setVal if we allocated burn_weights --- Source/driver/Castro_advance_ctu.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/driver/Castro_advance_ctu.cpp b/Source/driver/Castro_advance_ctu.cpp index f347d35c7a..7f030c1cb6 100644 --- a/Source/driver/Castro_advance_ctu.cpp +++ b/Source/driver/Castro_advance_ctu.cpp @@ -205,7 +205,9 @@ Castro::retry_advance_ctu(Real dt, const advance_status& status) #endif #ifdef REACTIONS - burn_weights.setVal(0.0); + if (castro::store_burn_weights) { + burn_weights.setVal(0.0); + } #endif // For simplified SDC, we'll have garbage data if we