Addressing comments from @paulromano's review

This commit is contained in:
Patrick Shriwise 2023-01-12 23:13:35 -06:00
parent e873db9a07
commit d4cbcd12fc
4 changed files with 51 additions and 16 deletions

View file

@ -113,7 +113,6 @@ public:
int32_t n_sources() const { return this->mesh()->n_bins(); }
private:
Mesh* mesh_ptr_ {nullptr};
int32_t mesh_idx_ {C_NONE};
double total_strength_ {0.0};
std::vector<double> mesh_CDF_;

View file

@ -78,7 +78,8 @@ public:
//! Sample a mesh volume using a certain seed
//
//! \param[in] seed Seed to use for random sampling
//! \param[out] r Position within tet
//! \param[in] bin Bin value of the tet sampled
//! \return sampled position within tet
virtual Position sample(uint64_t* seed, int32_t bin) const=0;
//! Get the volume of a mesh bin
@ -536,6 +537,8 @@ public:
true}; //!< Write tallies onto the unstructured mesh at the end of a run
std::string filename_; //!< Path to unstructured mesh file
ElementType element_type(int bin) const;
protected:
//! Set the length multiplier to apply to each point in the mesh
void set_length_multiplier(const double length_multiplier);
@ -545,7 +548,12 @@ protected:
1.0}; //!< Constant multiplication factor to apply to mesh coordinates
bool specified_length_multiplier_ {false};
//! Sample a tetrahedron for an unstructured mesh
//! Sample barycentric coordinates given a seed and the vertex positions and
//! return the sampled position
//
//! \param[in] coords Coordinates of the tetrahedron
//! \param[in] seed Random number generation seed
//! \return Sampled position within the tetrahedron
Position sample_tet(std::array<Position, 4> coords, uint64_t* seed) const;
private: