Function opensn::CMFDApplyFineCellRatios

Function Documentation

void opensn::CMFDApplyFineCellRatios(const DiscreteOrdinatesProblem &do_problem, unsigned int first_group, unsigned int num_groups, unsigned int group_aggregation_size, const std::vector<double> &fine_cell_ratios, bool all_moments, std::vector<double> &phi)

Scale the fine flux moments by the fine-cell ratios of CMFDComputeFineCellRatios.

phi is a full local flux-moment vector of the problem and is modified in place for the groups first_group to first_group + num_groups - 1. fine_cell_ratios has one entry per local cell and coarse group, with the same group_aggregation_size as the call that computed it. Only the scalar moment is scaled unless all_moments is true. Scaling every moment by the same ratio scales the angular flux of the cell, so the moments keep their ratios to one another. The operation is local to the rank.

Throws:

std::invalid_argument – If group_aggregation_size is zero or a vector has the wrong size.