9 double local_integral = 0.0;
12 for (
const auto& cell :
grid_ptr_->local_cells)
20 for (
const auto& group :
groups_)
22 const int g = group.id_;
23 const double Q = source->source_value_g_[g];
27 const int num_nodes = transport_view.NumNodes();
28 for (
int i = 0; i < num_nodes; ++i)
30 const size_t dof_map = transport_view.MapDOF(i, 0, g);
34 local_integral += Q * phi * fe_values.Vi_vectors[i];
43 const auto& info_list = point_source.ContainingCellsInfo();
44 for (
const auto& info : info_list)
46 const auto& cell =
grid_ptr_->local_cells[info.cell_local_id];
48 const auto& source_strength = point_source.Strength();
49 const auto& shape_values = info.shape_values;
51 for (
const auto& group :
groups_)
53 const int g = group.id_;
54 const double S = source_strength[g] * info.volume_weight;
58 const int num_nodes = transport_view.NumNodes();
59 for (
int i = 0; i < num_nodes; ++i)
61 const size_t dof_map = transport_view.MapDOF(i, 0, g);
65 local_integral += S * phi_i * shape_values[i];
72 double global_integral = 0.0;
74 MPI_Allreduce(&local_integral,
80 return global_integral;
static chi::MPI_Info & mpi
double ComputeInnerProduct()
std::vector< PointSource > point_sources_
chi_mesh::MeshContinuumPtr grid_ptr_
std::vector< lbs::CellLBSView > cell_transport_views_
std::vector< UnitCellMatrices > unit_cell_matrices_
std::vector< LBSGroup > groups_
std::vector< double > phi_old_local_
std::map< int, IsotropicSrcPtr > matid_to_src_map_