Make the user-defined distribcells an argument to the function.

This commit is contained in:
Patrick Shriwise 2021-08-05 17:03:37 -05:00
parent 7cb0b855f6
commit 88ec652760
5 changed files with 13 additions and 7 deletions

View file

@ -7,6 +7,7 @@
#include <cstdint>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include "openmc/vector.h"
@ -63,9 +64,12 @@ int32_t find_root_universe();
//==============================================================================
//! Populate all data structures needed for distribcells.
//! \param user_distribcells A set of cell indices to create distribcell data
//! structures for regardless of whether or not they are part of a tally
//! filter.
//==============================================================================
void prepare_distribcell();
void prepare_distribcell(const std::unordered_set<int32_t>* user_distribcells = nullptr);
//==============================================================================
//! Recursively search through the geometry and count cell instances.

View file

@ -105,7 +105,6 @@ extern int trigger_batch_interval; //!< Batch interval for triggers
extern "C" int verbosity; //!< How verbose to make output
extern double weight_cutoff; //!< Weight cutoff for Russian roulette
extern double weight_survive; //!< Survival weight after Russian roulette
extern std::unordered_set<int32_t> distribcells; //!< Manually set distribcells
} // namespace settings
//==============================================================================

View file

@ -44,6 +44,8 @@ public:
const vector<CellInstance>& cell_instances() const { return cell_instances_; }
const std::unordered_set<int32_t>& cells() const { return cells_; }
void set_cell_instances(gsl::span<CellInstance> instances);
private: