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 
50  virtual Real storeResults(const std::vector<unsigned int> & var_numbers,
51  unsigned int local_score,
52  unsigned int global_score,
53  const std::string & output_type) override;
54 
55 protected:
62 
67  std::vector<OpenMCCellAverageProblem::cellInfo> getTallyCells() const;
68 
70  std::unordered_set<SubdomainID> _tally_blocks;
71 
73  std::map<OpenMCCellAverageProblem::cellInfo, bool> _cell_has_tally;
74 
76  openmc::CellInstanceFilter * _cell_filter;
77 
90 
93 };
CellTally::validParams
static InputParameters validParams()
CellTally::_tally_blocks
std::unordered_set< SubdomainID > _tally_blocks
Blocks for which to add cell tallies.
Definition: CellTally.h:70
CellTally::_check_equal_mapped_tally_volumes
const bool & _check_equal_mapped_tally_volumes
Definition: CellTally.h:89
CellTally::storeResults
virtual Real storeResults(const std::vector< unsigned int > &var_numbers, unsigned int local_score, unsigned int global_score, const std::string &output_type) override
CellTally::getTallyCells
std::vector< OpenMCCellAverageProblem::cellInfo > getTallyCells() const
CellTally::spatialFilter
virtual std::pair< unsigned int, openmc::Filter * > spatialFilter() override
TallyBase.h
CellTally::_equal_tally_volume_abs_tol
const Real & _equal_tally_volume_abs_tol
Absolute tolerance for checking equal tally mapped volumes.
Definition: CellTally.h:92
CellTally::_cell_has_tally
std::map< OpenMCCellAverageProblem::cellInfo, bool > _cell_has_tally
Whether a cell index, instance pair should be added to the tally filter.
Definition: CellTally.h:73
CellTally::checkCellMappedSubdomains
void checkCellMappedSubdomains()
CellTally::CellTally
CellTally(const InputParameters &parameters)
CellTally
Definition: CellTally.h:26
TallyBase
Definition: TallyBase.h:32
CellTally::_cell_filter
openmc::CellInstanceFilter * _cell_filter
OpenMC mesh filter for this unstructured mesh tally.
Definition: CellTally.h:76
OpenMCCellAverageProblem.h