Class MultiGroupXS
Defined in File multi_group_xs.h
Nested Relationships
Nested Types
Class Documentation
-
class MultiGroupXS
Public Functions
-
inline MultiGroupXS()
-
void Scale(double factor)
Scale the cross sections by the specified factor.
Note
Scaling factors do not compound. Each time this routine is called, the cross sections are scaled from the original, unscaled data.
-
inline double GetScaleFactor() const
-
void ExportToOpenSnXSFile(const std::string &file_name, double fission_scaling = 1.0) const
Exports the cross-section information to OpenSn format.
- Parameters:
file_name – The name of the file to save the cross sections to.
fission_scaling – A factor to scale fission data to. This is generally equal to \( 1/k_{eff} \). Generally, this is done to create exactly critical cross sections for a transient initial condition.
-
inline unsigned int GetNumGroups() const
-
inline unsigned int GetScatteringOrder() const
-
inline unsigned int GetNumPrecursors() const
-
inline bool IsFissionable() const
-
inline void SetAdjointMode(bool val)
-
inline bool GetAdjointMode() const
-
inline const std::vector<double> &GetSigmaTotal() const
-
inline const std::vector<double> &GetSigmaAbsorption() const
-
inline const std::vector<double> &GetEnergyDeposition() const
-
inline const std::vector<double> &GetStoppingPower() const
-
inline const std::vector<ParticleType> &GetParticleTypes() const
-
std::vector<std::pair<unsigned int, unsigned int>> GetStoppingPowerGroupRanges() const
Returns contiguous half-open ranges of groups with nonzero stopping power.
-
inline const std::vector<SparseMatrix> &GetTransferMatrices() const
-
inline const SparseMatrix &GetTransferMatrix(unsigned int ell) const
-
inline const std::vector<double> &GetChi() const
-
inline const std::vector<double> &GetSigmaFission() const
-
inline const std::vector<double> &GetNuSigmaF() const
-
inline const std::vector<double> &GetNuPromptSigmaF() const
-
inline const std::vector<double> &GetNuDelayedSigmaF() const
-
inline const std::vector<std::vector<double>> &GetProductionMatrix() const
Note
The LBS source and fission-production routines assume this matrix represents prompt production when delayed-neutrons are enabled, and add delayed production from nu_delayed_sigma_f separately. If production_matrix_ ever includes delayed contributions, those routines must be updated to avoid double counting.
-
inline const std::vector<double> &GetInverseVelocity() const
-
inline bool DiffusionInitialized() const
-
inline const std::vector<double> &GetSigmaTransport() const
-
inline const std::vector<double> &GetDiffusionCoefficient() const
-
inline const std::vector<double> &GetSigmaRemoval() const
-
inline const std::vector<double> &GetSigmaSGtoG() const
-
std::vector<double> GetDeltaE() const
-
inline bool HasEnergyGroupBounds() const
Returns true when a complete energy group structure is available.
-
std::pair<double, double> GetEnergyGroupBounds(unsigned int g) const
Returns the upper and lower energy bounds of group g in the imported energy units.
This accounts for the shared maximum energy at CEPXS particle-species transitions. Throws std::out_of_range if group bounds are unavailable or g is out of range.
-
std::vector<double> ComputeCollisionEnergyLossCoefficients(const EnergyGroupStructure &energy) const
Computes the per-group collision energy-loss coefficients for this material.
-
bool HasCustomXS(const std::string &name) const
-
const std::vector<double> &GetCustomXS(const std::string &name) const
-
std::vector<std::string> GetCustomXSNames() const
-
const std::vector<double> *GetByName(const std::string &xs_name) const
Public Static Functions
Resolves one energy group structure from a collection of material cross sections.
Materials may omit their group structure, but all supplied structures must have identical per-group bounds. At least one complete structure is required.
-
static MultiGroupXS CreateSimpleOneGroup(double sigma_t, double c, double velocity = 0.0)
Makes a simple material with a 1-group cross-section set.
-
static MultiGroupXS LoadFromOpenSn(const std::string &filename)
-
static MultiGroupXS LoadFromCEPXS(const std::string &filename, int material_id = 0, bool csda_format = false, const std::vector<std::string> &particle_order = {})
Loads multi-group cross sections from a CEPXS-BFP binary file.
- Parameters:
filename – Path to the CEPXS-BFP binary file.
material_id – Zero-based index of the material to read from the file.
csda_format – When true, reads the CSDA row layout produced by the modified CEPXS, which adds stopping power and requires physical energy group bounds. When false, reads the standard CEPXS row layout and imports no stopping power.
particle_order – Optional particle species for each energy block, in BXSLIB order. Accepted values are
photon,electron, andpositron, with at most one block of each type. When omitted for CSDA data, a single block with nonzero stopping power is inferred as electrons. A single zero-stopping-power block remains unknown so that void materials can inherit the species from other materials. Multi-block CSDA libraries require this argument.
-
static MultiGroupXS LoadFromOpenMC(const std::string &file_name, const std::string &dataset_name, double temperature, const std::vector<std::string> &extra_xs_names = {})
This method populates transport cross sections from an OpenMC cross-section file.
Populates the cross section from a combination of others.
Public Static Attributes
-
static double STOPPING_POWER_TOLERANCE = 1.0e-12
-
struct Precursor
A struct containing data for a delayed neutron precursor.
-
inline MultiGroupXS()