12 const auto &isotropic_transfer_matrix = mat_id_xs.second->TransferMatrix(0);
13 const auto &sigma_t = mat_id_xs.second->SigmaTotal();
14 const auto &diffusion_coeff = mat_id_xs.second->DiffusionCoefficient();
19 for (
const auto &[row_g, gprime, sigma]: isotropic_transfer_matrix.Row(g))
30 A[g][g] = sigma_t[g] - S[g][g];
31 for (
unsigned int gp = 0; gp < g; ++gp)
33 for (
unsigned int gp = g + 1; gp <
num_groups_; ++gp)
48 sum += std::fabs(E[g]);
50 spectrum[g] = std::fabs(E[g]) / sum;
52 double collapsed_D = 0.0;
53 double collapsed_sig_a = 0.0;
56 collapsed_D += diffusion_coeff[g] * spectrum[g];
57 collapsed_sig_a += sigma_t[g] * spectrum[g];
59 collapsed_sig_a -= S[g][gp] * spectrum[gp];
63 std::stringstream outstr;
64 for (
auto &xi: spectrum)
77 const auto mat_id = mat_id_xs.first;
std::vector< VecDbl > MatDbl
std::vector< double > VecDbl
std::map< int, TwoGridCollapsedInfo > map_mat_id_2_tginfo
std::map< int, std::shared_ptr< chi_physics::MultiGroupXS > > matid_to_xs_map
void Compute_TwoGrid_Params()
double PowerIteration(const MatDbl &A, VecDbl &e_vec, int max_it=2000, double tol=1.0e-13)
MatDbl Inverse(const MatDbl &A)
MatDbl MatMul(const MatDbl &A, const double c)