Cardinal
CellTally.h
Go to the documentation of this file.
1 /********************************************************************/
2 /* SOFTWARE COPYRIGHT NOTIFICATION */
3 /* Cardinal */
4 /* */
5 /* (c) 2021 UChicago Argonne, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by UChicago Argonne, LLC */
9 /* Under Contract No. DE-AC02-06CH11357 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* Prepared by Battelle Energy Alliance, LLC */
13 /* Under Contract No. DE-AC07-05ID14517 */
14 /* With the U. S. Department of Energy */
15 /* */
16 /* See LICENSE for full restrictions */
17 /********************************************************************/
18 
19 #pragma once
20 
21 #include "TallyBase.h"
23 
24 #include "openmc/tallies/filter_cell.h"
25 
26 class CellTally : public TallyBase
27 {
28 public:
29  static InputParameters validParams();
30 
31  CellTally(const InputParameters & parameters);
32 
38  virtual std::pair<unsigned int, openmc::Filter *> spatialFilter() override;
39 
44  const std::unordered_set<SubdomainID> & getBlocks() const { return _tally_blocks; }
45 
46 protected:
58  virtual Real storeResultsInner(const std::vector<unsigned int> & var_numbers,
59  unsigned int local_score,
60  unsigned int global_score,
61  std::vector<xt::xtensor<double, 1>> tally_vals) override;
62 
69 
74  std::vector<OpenMCCellAverageProblem::cellInfo> getTallyCells() const;
75 
77  std::unordered_set<SubdomainID> _tally_blocks;
78 
80  std::map<OpenMCCellAverageProblem::cellInfo, bool> _cell_has_tally;
81 
83  openmc::CellInstanceFilter * _cell_filter;
84 
97 
100 };
openmc::CellInstanceFilter * _cell_filter
OpenMC mesh filter for this unstructured mesh tally.
Definition: CellTally.h:83
const bool & _check_equal_mapped_tally_volumes
Definition: CellTally.h:96
Definition: CellTally.h:26
std::unordered_set< SubdomainID > _tally_blocks
Blocks for which to add cell tallies.
Definition: CellTally.h:77
std::vector< OpenMCCellAverageProblem::cellInfo > getTallyCells() const
virtual std::pair< unsigned int, openmc::Filter * > spatialFilter() override
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) override
const Real & _equal_tally_volume_abs_tol
Absolute tolerance for checking equal tally mapped volumes.
Definition: CellTally.h:99
void checkCellMappedSubdomains()
const std::unordered_set< SubdomainID > & getBlocks() const
Definition: CellTally.h:44
std::map< OpenMCCellAverageProblem::cellInfo, bool > _cell_has_tally
Whether a cell index, instance pair should be added to the tally filter.
Definition: CellTally.h:80
Definition: TallyBase.h:33
CellTally(const InputParameters &parameters)
static InputParameters validParams()