Loading [MathJax]/extensions/tex2jax.js
Cardinal
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
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
26class CellTally : public TallyBase
27{
28public:
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
46protected:
59 virtual Real storeResultsInner(const std::vector<unsigned int> & var_numbers,
60 unsigned int local_score,
61 unsigned int global_score,
62 std::vector<xt::xtensor<double, 1>> tally_vals,
63 bool norm_by_src_rate = true) override;
64
71
76 std::vector<OpenMCCellAverageProblem::cellInfo> getTallyCells() const;
77
79 std::unordered_set<SubdomainID> _tally_blocks;
80
82 std::map<OpenMCCellAverageProblem::cellInfo, bool> _cell_has_tally;
83
85 openmc::CellInstanceFilter * _cell_filter;
86
99
102};
Definition CellTally.h:27
openmc::CellInstanceFilter * _cell_filter
OpenMC mesh filter for this unstructured mesh tally.
Definition CellTally.h:85
CellTally(const InputParameters &parameters)
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, bool norm_by_src_rate=true) override
std::unordered_set< SubdomainID > _tally_blocks
Blocks for which to add cell tallies.
Definition CellTally.h:79
void checkCellMappedSubdomains()
static InputParameters validParams()
const std::unordered_set< SubdomainID > & getBlocks() const
Definition CellTally.h:44
std::vector< OpenMCCellAverageProblem::cellInfo > getTallyCells() const
const Real & _equal_tally_volume_abs_tol
Absolute tolerance for checking equal tally mapped volumes.
Definition CellTally.h:101
std::map< OpenMCCellAverageProblem::cellInfo, bool > _cell_has_tally
Whether a cell index, instance pair should be added to the tally filter.
Definition CellTally.h:82
const bool & _check_equal_mapped_tally_volumes
Definition CellTally.h:98
virtual std::pair< unsigned int, openmc::Filter * > spatialFilter() override
Definition TallyBase.h:34