@@ -25,17 +25,6 @@ enum class WeightWindowUpdateMethod { MAGIC, FW_CADIS };
2525
2626constexpr double DEFAULT_WEIGHT_CUTOFF {1.0e-38 }; // default low weight cutoff
2727
28- // ==============================================================================
29- // Non-member functions
30- // ==============================================================================
31-
32- // ! Apply weight windows to a particle
33- // ! \param[in] p Particle to apply weight windows to
34- void apply_weight_windows (Particle& p);
35-
36- // ! Free memory associated with weight windows
37- void free_memory_weight_windows ();
38-
3928// ==============================================================================
4029// Global variables
4130// ==============================================================================
@@ -137,7 +126,7 @@ class WeightWindows {
137126
138127 // ! Retrieve the weight window for a particle
139128 // ! \param[in] p Particle to get weight window for
140- WeightWindow get_weight_window (const Particle& p) const ;
129+ std::pair< bool , WeightWindow> get_weight_window (const Particle& p) const ;
141130
142131 std::array<int , 2 > bounds_size () const ;
143132
@@ -236,6 +225,26 @@ class WeightWindowsGenerator {
236225 double ratio_ {5.0 }; // <! ratio of lower to upper weight window bounds
237226};
238227
228+ // ==============================================================================
229+ // Non-member functions
230+ // ==============================================================================
231+
232+ // ! Apply weight windows to a particle
233+ // ! \param[in] p Particle to apply weight windows to
234+ void apply_weight_windows (Particle& p);
235+
236+ // ! Apply weight window to a particle
237+ // ! \param[in] p Particle to apply weight window to
238+ // ! \param[in] weight_window WeightWindow to apply
239+ void apply_weight_window (Particle& p, WeightWindow weight_window);
240+
241+ // ! Free memory associated with weight windows
242+ void free_memory_weight_windows ();
243+
244+ // ! Search weight window that apply to a particle
245+ // ! \param[in] p Particle to search weight window for
246+ std::pair<bool , WeightWindow> search_weight_window (const Particle& p);
247+
239248// ! Finalize variance reduction objects after all inputs have been read
240249void finalize_variance_reduction ();
241250
0 commit comments