21 #include "MooseObject.h" 24 #include "openmc/tallies/tally.h" 25 #include "xtensor/xview.hpp" 30 class AuxiliarySystem;
38 TallyBase(
const InputParameters & parameters);
46 virtual std::pair<unsigned int, openmc::Filter *>
spatialFilter() = 0;
69 Real
storeResults(
const std::vector<unsigned int> & var_numbers,
70 unsigned int local_score,
71 unsigned int global_score,
72 const std::string & output_type);
78 void addScore(
const std::string & score);
192 unsigned int local_score,
193 unsigned int global_score,
194 std::vector<xt::xtensor<double, 1>> tally_vals) = 0;
203 const std::vector<unsigned int> & elem_ids,
const std::vector< std::string > & getOutputs() const
Definition: TallyBase.h:133
void fillElementalAuxVariable(const unsigned int &var_num, const std::vector< unsigned int > &elem_ids, const Real &value)
virtual void initializeTally()
std::vector< xt::xtensor< double, 1 > > _current_tally
Definition: TallyBase.h:282
const Real & getMean(unsigned int local_score) const
Definition: TallyBase.h:146
std::vector< xt::xtensor< double, 1 > > _previous_tally
Previous fixed point iteration tally result (after relaxation)
Definition: TallyBase.h:285
Real storeResults(const std::vector< unsigned int > &var_numbers, unsigned int local_score, unsigned int global_score, const std::string &output_type)
openmc::TallyEstimator _estimator
The OpenMC estimator to use with this tally.
Definition: TallyBase.h:225
void applyTriggersToLocalTally(openmc::Tally *tally)
static constexpr Real ZERO_TALLY_THRESHOLD
Tolerance for setting zero tally.
Definition: TallyBase.h:303
std::vector< std::string > _tally_name
Auxiliary variable name(s) for this tally.
Definition: TallyBase.h:231
const MultiMooseEnum * _tally_trigger
Definition: TallyBase.h:260
Tally/filter includes.
Definition: OpenMCCellAverageProblem.h:64
virtual void resetTally()
std::vector< Real > _local_mean_tally
Definition: TallyBase.h:252
std::vector< Real > _tally_trigger_threshold
Definition: TallyBase.h:266
const bool _has_outputs
Whether this tally has additional outputs or not.
Definition: TallyBase.h:297
static InputParameters validParams()
unsigned int _num_ext_filter_bins
The number of non-spatial bins in this tally.
Definition: TallyBase.h:243
std::vector< std::string > _output_name
Suffixes to apply to 'tally_name' in order to name the fields in the 'output'.
Definition: TallyBase.h:300
TallyBase(const InputParameters ¶meters)
std::vector< std::string > _tally_score
OpenMC tally score(s) to use with this tally.
Definition: TallyBase.h:228
unsigned int _filter_index
The index of the first filter added by this tally.
Definition: TallyBase.h:240
std::vector< xt::xtensor< double, 1 > > _current_raw_tally
Current "raw" tally output from Monte Carlo solution.
Definition: TallyBase.h:288
OpenMCCellAverageProblem & _openmc_problem
The OpenMCCellAverageProblem using the tally system.
Definition: TallyBase.h:213
const bool _renames_tally_vars
Whether this tally stores results in variables names something other than '_tally_score'.
Definition: TallyBase.h:294
Definition: TallyBase.h:33
void addScore(const std::string &score)
const Real & getSum(unsigned int local_score) const
Definition: TallyBase.h:153
MooseMesh & _mesh
The MooseMesh.
Definition: TallyBase.h:216
virtual Real storeResultsInner(const std::vector< unsigned int > &var_numbers, unsigned int local_score, unsigned int global_score, std::vector< xt::xtensor< double, 1 >> tally_vals)=0
unsigned int numExtFilterBins() const
Definition: TallyBase.h:177
bool renamesTallyVars() const
Definition: TallyBase.h:171
Definition: FilterBase.h:40
std::vector< Real > _local_sum_tally
Sum value of this tally across all bins. Indexed by score.
Definition: TallyBase.h:246
openmc::TallyEstimator getTallyEstimator() const
Definition: TallyBase.h:139
const openmc::Tally * getWrappedTally() const
virtual std::pair< unsigned int, openmc::Filter * > spatialFilter()=0
openmc::Tally * _local_tally
The OpenMC tally object this class wraps.
Definition: TallyBase.h:234
bool hasOutputs() const
Definition: TallyBase.h:165
unsigned int _local_tally_index
The index of the OpenMC tally this object wraps.
Definition: TallyBase.h:237
Definition: CardinalEnums.h:129
void relaxAndNormalizeTally(unsigned int local_score, const Real &alpha, const Real &norm)
bool hasTrigger() const
Definition: TallyBase.h:159
std::vector< xt::xtensor< double, 1 > > _current_raw_tally_std_dev
Current "raw" tally standard deviation.
Definition: TallyBase.h:291
AuxiliarySystem & _aux
The aux system.
Definition: TallyBase.h:219
std::vector< bool > _trigger_ignore_zeros
Definition: TallyBase.h:272
const std::vector< std::string > & getScores() const
Definition: TallyBase.h:118
const std::vector< std::string > & getAuxVarNames() const
Definition: TallyBase.h:126
std::vector< std::shared_ptr< FilterBase > > _ext_filters
The external filters added in the [Problem/Filters] block.
Definition: TallyBase.h:222