mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-29 06:35:48 -04:00
Initial Mesh Sampling Changes
This commit is contained in:
parent
3f8f8f6701
commit
238ab5210e
2 changed files with 101 additions and 0 deletions
|
|
@ -75,6 +75,12 @@ public:
|
|||
|
||||
// Methods
|
||||
|
||||
//! Sample a mesh volume using a certain seed
|
||||
//
|
||||
//! \param[in] seed Seed to use for random sampling
|
||||
//! \param[out] r Position within tet
|
||||
virtual Position sample(uint64_t* seed) const=0;
|
||||
|
||||
//! Determine which bins were crossed by a particle
|
||||
//
|
||||
//! \param[in] r0 Previous position of the particle
|
||||
|
|
@ -160,6 +166,8 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
Position sample(uint64_t* seed) const override;
|
||||
|
||||
int get_bin(Position r) const override;
|
||||
|
||||
int n_bins() const override;
|
||||
|
|
@ -460,7 +468,12 @@ public:
|
|||
static const std::string mesh_type;
|
||||
virtual std::string get_mesh_type() const override;
|
||||
|
||||
//! Sample a tetrahedron for an unstructured mesh
|
||||
virtual Position sample_tet(std::array<Position, 4> coords, uint64_t* seed) const;
|
||||
|
||||
// Overridden Methods
|
||||
// TODO Position sample(uint64_t* seed) const=0;
|
||||
|
||||
void surface_bins_crossed(Position r0, Position r1, const Direction& u,
|
||||
vector<int>& bins) const override;
|
||||
|
||||
|
|
@ -552,6 +565,8 @@ public:
|
|||
|
||||
// Overridden Methods
|
||||
|
||||
Position sample(uint64_t* seed) const override;
|
||||
|
||||
void bins_crossed(Position r0, Position r1, const Direction& u,
|
||||
vector<int>& bins, vector<double>& lengths) const override;
|
||||
|
||||
|
|
@ -714,6 +729,8 @@ public:
|
|||
void bins_crossed(Position r0, Position r1, const Direction& u,
|
||||
vector<int>& bins, vector<double>& lengths) const override;
|
||||
|
||||
Position sample(uint64_t* seed) const override;
|
||||
|
||||
int get_bin(Position r) const override;
|
||||
|
||||
int n_bins() const override;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue