Adding SphericalIndependent source type

Applied suggestions from code review

Co-Authored-By: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
Ethan Peterson 2019-11-04 17:27:50 -05:00
parent 33cdeb44ed
commit 15c7148331
11 changed files with 296 additions and 13 deletions

View file

@ -37,6 +37,24 @@ private:
UPtrDist z_; //!< Distribution of z coordinates
};
//==============================================================================
//! Distribution of points specified by spherical coordinates r,theta,phi
//==============================================================================
class SphericalIndependent : public SpatialDistribution {
public:
explicit SphericalIndependent(pugi::xml_node node);
//! Sample a position from the distribution
//! \return Sampled position
Position sample() const;
private:
UPtrDist r_; //!< Distribution of r coordinates
UPtrDist theta_; //!< Distribution of theta coordinates
UPtrDist phi_; //!< Distribution of phi coordinates
Position origin_; //!< Cartesian coordinates of the sphere center
};
//==============================================================================
//! Uniform distribution of points over a box
//==============================================================================