mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Use Discrete distribution for mesh sampling
This version builds the independent variable by converting int to double and then converts back when sampling.
This commit is contained in:
parent
2d20cd31f2
commit
ee6975767d
2 changed files with 3 additions and 30 deletions
|
|
@ -114,11 +114,7 @@ public:
|
|||
|
||||
private:
|
||||
int32_t mesh_idx_ {C_NONE};
|
||||
double total_strength_ {0.0};
|
||||
// TODO: move to an independent class in the future that's similar
|
||||
// to a discrete distribution without outcomes
|
||||
std::vector<double> mesh_CDF_;
|
||||
std::vector<double> mesh_strengths_;
|
||||
UPtrDist elem_idx_; //!< Distribution of mesh element indices
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue