mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 21:25:36 -04:00
Adding a set of distribcells that can be manually set.
This commit is contained in:
parent
180fefc99d
commit
7cb0b855f6
3 changed files with 5 additions and 1 deletions
|
|
@ -105,6 +105,7 @@ 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
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -315,8 +315,10 @@ prepare_distribcell()
|
|||
{
|
||||
write_message("Preparing distributed cell instances...", 5);
|
||||
|
||||
// start with any cells manually specified via the C++ API
|
||||
std::unordered_set<int32_t> distribcells = settings::distribcells;
|
||||
|
||||
// Find all cells listed in a DistribcellFilter or CellInstanceFilter
|
||||
std::unordered_set<int32_t> distribcells;
|
||||
for (auto& filt : model::tally_filters) {
|
||||
auto* distrib_filt = dynamic_cast<DistribcellFilter*>(filt.get());
|
||||
auto* cell_inst_filt = dynamic_cast<CellInstanceFilter*>(filt.get());
|
||||
|
|
|
|||
|
|
@ -114,6 +114,7 @@ int trigger_batch_interval {1};
|
|||
int verbosity {7};
|
||||
double weight_cutoff {0.25};
|
||||
double weight_survive {1.0};
|
||||
std::unordered_set<int32_t> distribcells;
|
||||
|
||||
} // namespace settings
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue