11double LBSSolver::ComputeFissionProduction(
const std::vector<double>& phi)
13 const int first_grp =
groups_.front().id_;
14 const int last_grp =
groups_.back().id_;
17 double local_production = 0.0;
24 const auto& xs = transport_view.XS();
25 const auto& F = xs.ProductionMatrix();
26 const auto& nu_delayed_sigma_f = xs.NuDelayedSigmaF();
28 if (not xs.IsFissionable())
continue;
31 const int num_nodes = transport_view.NumNodes();
32 for (
int i = 0; i < num_nodes; ++i)
34 const size_t uk_map = transport_view.MapDOF(i, 0, 0);
35 const double IntV_ShapeI = cell_matrices.Vi_vectors[i];
38 for (
size_t g = first_grp; g <= last_grp; ++g)
40 const auto& prod = F[g];
41 for (
size_t gp = 0; gp <= last_grp; ++gp)
42 local_production += prod[gp] *
47 for (
unsigned int j = 0; j < xs.NumPrecursors(); ++j)
48 local_production += nu_delayed_sigma_f[g] *
56 double global_production = 0.0;
57 MPI_Allreduce(&local_production,
63 return global_production;
71 const int first_grp =
groups_.front().id_;
72 const int last_grp =
groups_.back().id_;
75 double local_fission_rate = 0.0;
82 const auto& xs = transport_view.XS();
83 const auto& sigma_f = xs.SigmaFission();
86 if (not xs.IsFissionable())
continue;
89 const int num_nodes = transport_view.NumNodes();
90 for (
int i = 0; i < num_nodes; ++i)
92 const size_t uk_map = transport_view.MapDOF(i, 0, 0);
93 const double IntV_ShapeI = cell_matrices.Vi_vectors[i];
96 for (
size_t g = first_grp; g <= last_grp; ++g)
97 local_fission_rate += sigma_f[g] * phi[uk_map + g] * IntV_ShapeI;
102 double global_fission_rate = 0.0;
103 MPI_Allreduce(&local_fission_rate,
104 &global_fission_rate,
109 return global_fission_rate;
static chi::MPI_Info & mpi
chi_mesh::MeshContinuumPtr grid_ptr_
std::vector< lbs::CellLBSView > cell_transport_views_
std::vector< UnitCellMatrices > unit_cell_matrices_
std::vector< LBSGroup > groups_
double ComputeFissionRate(const std::vector< double > &phi)