mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-29 06:35:48 -04:00
Simple rejection based on a vector of cell IDs
This commit is contained in:
parent
1d140e348d
commit
aff6316642
3 changed files with 65 additions and 15 deletions
|
|
@ -4,6 +4,8 @@
|
|||
#ifndef OPENMC_SOURCE_H
|
||||
#define OPENMC_SOURCE_H
|
||||
|
||||
#include <unordered_set>
|
||||
|
||||
#include "pugixml.hpp"
|
||||
|
||||
#include "openmc/distribution_multi.h"
|
||||
|
|
@ -51,13 +53,15 @@ public:
|
|||
};
|
||||
|
||||
//==============================================================================
|
||||
//! Source composed of independent spatial, angle, energy, and time distributions
|
||||
//! Source composed of independent spatial, angle, energy, and time
|
||||
//! distributions
|
||||
//==============================================================================
|
||||
|
||||
class IndependentSource : public Source {
|
||||
public:
|
||||
// Constructors
|
||||
IndependentSource(UPtrSpace space, UPtrAngle angle, UPtrDist energy, UPtrDist time);
|
||||
IndependentSource(
|
||||
UPtrSpace space, UPtrAngle angle, UPtrDist energy, UPtrDist time);
|
||||
explicit IndependentSource(pugi::xml_node node);
|
||||
|
||||
//! Sample from the external source distribution
|
||||
|
|
@ -82,6 +86,7 @@ private:
|
|||
UPtrAngle angle_; //!< Angular distribution
|
||||
UPtrDist energy_; //!< Energy distribution
|
||||
UPtrDist time_; //!< Time distribution
|
||||
std::unordered_set<int32_t> cells_; //!< Cells to reject from
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue