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:
Paul P.H. Wilson 2023-03-16 17:34:44 -05:00
parent 2d20cd31f2
commit ee6975767d
2 changed files with 3 additions and 30 deletions

View file

@ -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
};
//==============================================================================