@@ -193,6 +193,7 @@ void VolumeCalculation::execute(CalcResults& master_results) const
193193 constexpr double sqrt3_1 = 1 . / std::sqrt (3 .);
194194 p.u () = {sqrt3_1, sqrt3_1, sqrt3_1};
195195
196+ // TO REVIEWER: THE SWITCH IS TRANSFERED TO score_hit()
196197 if (exhaustive_find_cell (p))
197198 this ->score_hit (p, results);
198199
@@ -222,6 +223,7 @@ void VolumeCalculation::execute(CalcResults& master_results) const
222223 // bump iteration counter
223224 master_results.iterations ++;
224225
226+ // TO REVIEWER: THE MPI-RELATED PART IS MOVED TO collect_MPI()
225227#ifdef OPENMC_MPI
226228 master_results.collect_MPI (); // collect results to master process
227229#endif
@@ -324,6 +326,8 @@ void VolumeCalculation::show_volume(const std::string domain_type,
324326 fmt::print (" \n " );
325327}
326328
329+ // TO REVIEWER: I/O BLOCK BEGINS, I WOULD PREFFER TO PUT IT AT THE END OF FILE
330+ // BUT KEEPT THE FILE STRUCTURE UNCHANGED
327331void VolumeCalculation::show_results (const CalcResults& results) const
328332{
329333 // Show tracing statistics
@@ -452,6 +456,7 @@ void VolumeCalculation::to_hdf5(
452456 file_close (file_id);
453457}
454458
459+ // TO REVIEWER: THIS IS THE SAME check_hit()
455460void VolumeCalculation::check_hit (const int32_t i_material,
456461 const double contrib, vector<VolTally>& vol_tallies) const
457462{
@@ -471,6 +476,8 @@ void VolumeCalculation::check_hit(const int32_t i_material,
471476 vol_tallies.push_back (VolTally (i_material, contrib));
472477}
473478
479+ // TO REVIEWER: THIS IS AN EQUIVALENT OF THE reduce_indicies_hits() TEMPLATE
480+ // FROM volume_calc.h
474481void VolumeCalculation::reduce_results (
475482 const CalcResults& local_results, CalcResults& results) const
476483{
@@ -551,6 +558,8 @@ void VolumeCalculation::delete_MPI_struct() const
551558 MPI_Type_free (&mpi_volume_tally);
552559}
553560
561+ // TO REVIEWER: THIS IS AN EQUIVALENT OF THE RELATED MPI-INTERCHANGE BLOCK OF
562+ // execute()
554563void VolumeCalculation::CalcResults::collect_MPI ()
555564{
556565 vector<int > domain_sizes (vol_tallies.size ());
@@ -614,6 +623,7 @@ void VolumeCalculation::CalcResults::collect_MPI()
614623}
615624#endif
616625
626+ // TO REVIEWER: STATISTICS AND TALLY MANIPULATION BLOCK BEGIN
617627VolumeCalculation::CalcResults::CalcResults (const VolumeCalculation& vol_calc)
618628{
619629 n_samples = 0 ;
@@ -637,6 +647,8 @@ void VolumeCalculation::CalcResults::reset()
637647 }
638648}
639649
650+ // TO REVIEWER: THIS IS A PART OF THE RELATED TO MPI-INTERCHANGE
651+ // BLOCK OF execute()
640652void VolumeCalculation::CalcResults::append (const CalcResults& other)
641653{
642654 n_samples += other.n_samples ;
@@ -696,6 +708,10 @@ inline void VolumeCalculation::VolTally::append_tally(const VolTally& vol_tally)
696708 score_acc[1 ] += vol_tally.score_acc [1 ];
697709}
698710
711+ // TO REVIEWER: IF THIS APPROACH WILL BE FOUND OBFUSCATED, IT CAN BE ADJUSTED TO
712+ // LITERAL FORMULAE TRANSLATION WITH REPEATING MULTIPLY CALCULATIONS OF
713+ // THRESHOLD SQUARE ROOTS AND DIVISIONS FOR EACH VOLUME DOMAIN IN THE END OF
714+ // EACH BATCH
699715inline bool VolumeCalculation::VolTally::trigger_state (
700716 const TriggerMetric trigger_type, const double threshold,
701717 const size_t & n_samples) const
@@ -740,6 +756,7 @@ array<double, 2> VolumeCalculation::get_tally_results(const size_t& n_samples,
740756 return volume;
741757}
742758
759+ // TO REVIEWER: THIS IS A FULL EQUIVALENT OF THE SWITCH FROM THE HISTORY LOOP
743760void VolumeCalculation::score_hit (const Particle& p, CalcResults& results) const
744761{
745762 const auto n_domains = domain_ids_.size ();
0 commit comments