mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-29 06:35:48 -04:00
Adding SphericalIndependent source type
Applied suggestions from code review Co-Authored-By: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
parent
33cdeb44ed
commit
15c7148331
11 changed files with 296 additions and 13 deletions
|
|
@ -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
|
||||
//==============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue