Function opensn::ComputeAngularSource
Defined in File sweep_chunk.h
Function Documentation
-
inline void opensn::ComputeAngularSource(const CellLBSView &cell_transport_view, std::size_t num_nodes, unsigned int num_moments, unsigned int gs_gi, std::size_t gs_size, const double *m2d_row, const std::vector<double> &source_moments, double *nodal_source)
Evaluate the angular source of one direction at the nodes of a cell for every group of a groupset: nodal_source[i * gs_size + g] = sum over m of m2d_row[m] * q(i, m, gs_gi + g).
The source moments of a node are contiguous in memory, ordered by moment and then by group, so this reads them in memory order. The moments are summed in increasing order. A sweep kernel calls this once per cell and direction and then applies the mass matrix once per group, not once per moment.
nodal_sourcemust hold num_nodes * gs_size values.