Chi-Tech
lbs_01f_compute_nummoments.cc
Go to the documentation of this file.
1#include "lbs_solver.h"
2
3//###################################################################
4/** Computes the number of moments for the given mesher types*/
6{
7 for (size_t gs = 1; gs < groupsets_.size(); ++gs)
8 if (groupsets_[gs].quadrature_->GetMomentToHarmonicsIndexMap()
9 != groupsets_[0].quadrature_->GetMomentToHarmonicsIndexMap())
10 throw std::logic_error(
11 "LinearBoltzmann::SteadyStateSolver::ComputeNumberOfMoments : "
12 "Moment-to-Harmonics mapping differs between "
13 "groupsets_, which is not allowed.");
14
16 (int)groupsets_.front().quadrature_->GetMomentToHarmonicsIndexMap().size();
17
18 if (num_moments_ == 0)
19 throw std::logic_error(
20 "LinearBoltzmann::SteadyStateSolver::ComputeNumberOfMoments : "
21 "unable to infer number of moments from angular "
22 "quadrature.");
23}
24
std::vector< LBSGroupset > groupsets_
Definition: lbs_solver.h:68
size_t num_moments_
Definition: lbs_solver.h:62