6 if (num_precursors_ == 0 or not options_.use_precursors)
10 const double FPR = ComputeFissionProduction(phi_new_local_);
13 double localDNPR = 0.0;
14 for (
const auto& cell : grid_ptr_->local_cells)
16 const auto& transport_view = cell_transport_views_[cell.local_id_];
17 const double cell_volume = transport_view.Volume();
18 const size_t dof_map = cell.local_id_ + max_precursors_per_material_;
20 const auto& xs = transport_view.XS();
21 const auto& num_precursors = xs.NumPrecursors();
22 const auto& precursors = xs.Precursors();
25 if (not xs.IsFissionable())
29 for (
const auto& groupset : groupsets_)
31 auto gs_i =
static_cast<size_t>(groupset.groups_.front().id_);
32 auto gs_f =
static_cast<size_t>(groupset.groups_.back().id_);
35 for (
size_t g = gs_i; g <= gs_f; ++g)
36 for (
unsigned int j = 0; j < num_precursors; ++j)
38 const auto& precursor = precursors[j];
41 localDNPR += precursor.emission_spectrum[g] *
42 precursor.decay_constant *
43 precursor_new_local_[dof_map + j] *
51 MPI_Allreduce(&localDNPR, &DNPR, 1,
54 return DNPR / (DNPR + FPR);
static chi::MPI_Info & mpi