mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-29 06:35:48 -04:00
Minor updates to C++ source. Fix for CDF distribution sampling
This commit is contained in:
parent
0ffe0b39c1
commit
e100689c8f
3 changed files with 32 additions and 29 deletions
|
|
@ -108,14 +108,17 @@ public:
|
|||
//! \return Sampled position
|
||||
Position sample(uint64_t* seed) const;
|
||||
|
||||
const unique_ptr<Mesh>& mesh() const { return model::meshes.at(mesh_idx_); }
|
||||
|
||||
int32_t n_sources() const { return this->mesh()->n_bins(); }
|
||||
|
||||
private:
|
||||
Mesh* mesh_ptr_;
|
||||
int32_t mesh_idx_;
|
||||
Mesh* mesh_ptr_ {nullptr};
|
||||
int32_t mesh_idx_ {C_NONE};
|
||||
std::string sample_scheme_;
|
||||
double total_strength_;
|
||||
double total_strength_ {0.0};
|
||||
std::vector<double> mesh_CDF_;
|
||||
std::vector<double> mesh_strengths_;
|
||||
int32_t tot_bins_;
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue