Simple rejection based on a vector of cell IDs

This commit is contained in:
Paul Romano 2022-08-05 11:39:48 -05:00
parent 1d140e348d
commit aff6316642
3 changed files with 65 additions and 15 deletions

View file

@ -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
};
//==============================================================================