mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 21:25:36 -04:00
add some getters to 1D distributions
This commit is contained in:
parent
2a5a1ab841
commit
d45583ed19
1 changed files with 19 additions and 0 deletions
|
|
@ -62,6 +62,9 @@ public:
|
|||
//! \param seed Pseudorandom number seed pointer
|
||||
//! \return Sampled value
|
||||
double sample(uint64_t* seed) const;
|
||||
|
||||
double a() const { return a_; }
|
||||
double b() const { return a_; }
|
||||
private:
|
||||
double a_; //!< Lower bound of distribution
|
||||
double b_; //!< Upper bound of distribution
|
||||
|
|
@ -80,6 +83,8 @@ public:
|
|||
//! \param seed Pseudorandom number seed pointer
|
||||
//! \return Sampled value
|
||||
double sample(uint64_t* seed) const;
|
||||
|
||||
double theta() const { return theta_; }
|
||||
private:
|
||||
double theta_; //!< Factor in exponential [eV]
|
||||
};
|
||||
|
|
@ -97,6 +102,9 @@ public:
|
|||
//! \param seed Pseudorandom number seed pointer
|
||||
//! \return Sampled value
|
||||
double sample(uint64_t* seed) const;
|
||||
|
||||
double a() const { return a_; }
|
||||
double b() const { return b_; }
|
||||
private:
|
||||
double a_; //!< Factor in exponential [eV]
|
||||
double b_; //!< Factor in square root [1/eV]
|
||||
|
|
@ -115,6 +123,9 @@ public:
|
|||
//! \param seed Pseudorandom number seed pointer
|
||||
//! \return Sampled value
|
||||
double sample(uint64_t* seed) const;
|
||||
|
||||
double mean_value() const { return mean_value_; }
|
||||
double std_dev() const { return std_dev_; }
|
||||
private:
|
||||
double mean_value_; //!< middle of distribution [eV]
|
||||
double std_dev_; //!< standard deviation [eV]
|
||||
|
|
@ -134,6 +145,10 @@ public:
|
|||
//! \param seed Pseudorandom number seed pointer
|
||||
//! \return Sampled value
|
||||
double sample(uint64_t* seed) const;
|
||||
|
||||
double e0() const { return e0_; }
|
||||
double m_rat() const { return m_rat_; }
|
||||
double kt() const { return kt_; }
|
||||
private:
|
||||
// example DT fusion m_rat = 5 (D = 2 + T = 3)
|
||||
// ion temp = 20000 eV
|
||||
|
|
@ -161,6 +176,8 @@ public:
|
|||
// x property
|
||||
std::vector<double>& x() { return x_; }
|
||||
const std::vector<double>& x() const { return x_; }
|
||||
const std::vector<double>& p() const { return p_; }
|
||||
Interpolation interp() const { return interp_; }
|
||||
private:
|
||||
std::vector<double> x_; //!< tabulated independent variable
|
||||
std::vector<double> p_; //!< tabulated probability density
|
||||
|
|
@ -188,6 +205,8 @@ public:
|
|||
//! \param seed Pseudorandom number seed pointer
|
||||
//! \return Sampled value
|
||||
double sample(uint64_t* seed) const;
|
||||
|
||||
const std::vector<double>& x() const { return x_; }
|
||||
private:
|
||||
std::vector<double> x_; //! Possible outcomes
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue