From abcc2649b52416d6757af412cc84eb9788ec96c3 Mon Sep 17 00:00:00 2001 From: John Tramm Date: Wed, 1 Jul 2026 15:59:22 +0200 Subject: [PATCH] Scale the weight window cutoff with the window normalization WeightWindow::scale multiplies the lower, upper, and survival weights by a factor but left weight_cutoff fixed, so after a renormalization the cutoff no longer sat at the same relative depth below the window. Scale weight_cutoff by the same factor so it keeps its relative position in any normalization frame. Split out of #3968 for focused review. Co-authored-by: shimwell Co-authored-by: jon-proxima --- include/openmc/weight_windows.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/openmc/weight_windows.h b/include/openmc/weight_windows.h index a5d404133ce..4b592879514 100644 --- a/include/openmc/weight_windows.h +++ b/include/openmc/weight_windows.h @@ -61,6 +61,9 @@ struct WeightWindow { lower_weight *= factor; upper_weight *= factor; survival_weight *= factor; + // The cutoff is scaled with the window bounds so that it sits at the same + // relative depth below the window in any normalization frame + weight_cutoff *= factor; } };