12 Chi::log.
Log() <<
"\nAssemblying RHS for group " + std::to_string(g);
22 const auto& cell_mapping = sdm.GetCellMapping(cell);
23 const auto qp_data = cell_mapping.MakeVolumetricQuadraturePointData();
24 const size_t num_nodes = cell_mapping.NumNodes();
27 const auto& S = xs->TransferMatrix(0);
29 for (
const auto& [row_g, gprime, sigma_sm] : S.Row(g))
34 VecGetArrayRead(
x_[gprime], &xlocal);
36 for (
size_t i=0; i<num_nodes; ++i)
38 const int64_t imap = sdm.MapDOF(cell,i);
39 double inscatter_g = 0.0;
41 for (
size_t j = 0; j < num_nodes; ++j)
43 const int64_t jmap = sdm.MapDOFLocal(cell, j);
46 const double flxj_gp = xlocal[jmap];
47 for (
size_t qp: qp_data.QuadraturePointIndices())
48 inscatter_g += sigma_sm * flxj_gp *
49 qp_data.ShapeValue(i, qp) * qp_data.ShapeValue(j, qp) *
53 VecSetValue(
b_, imap, inscatter_g, ADD_VALUES);
55 VecRestoreArrayRead(
x_[gprime], &xlocal);
LogStream Log(LOG_LVL level=LOG_0)
std::map< int, std::shared_ptr< chi_physics::MultiGroupXS > > matid_to_xs_map
chi_mesh::MeshContinuumPtr grid_ptr_
chi_math::SDMPtr sdm_ptr_
void Assemble_RHS(unsigned int g, int64_t iverbose)