Cardinal
MeshTally.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_mesh.h"
25 
26 class MeshTally : public TallyBase
27 {
28 public:
29  static InputParameters validParams();
30 
31  MeshTally(const InputParameters & parameters);
32 
38  virtual std::pair<unsigned int, openmc::Filter *> spatialFilter() override;
39 
41  virtual void resetTally() override;
42 
53  virtual Real storeResults(const std::vector<unsigned int> & var_numbers,
54  unsigned int local_score,
55  unsigned int global_score,
56  const std::string & output_type) override;
57 
58 protected:
67 
77  const std::string * _mesh_template_filename = nullptr;
78 
81 
83  unsigned int _instance;
84 
86  unsigned int _mesh_index;
87 
89  openmc::MeshFilter * _mesh_filter;
90 
92  const openmc::LibMesh * _mesh_template;
93 };
MeshTally::checkMeshTemplateAndTranslations
void checkMeshTemplateAndTranslations() const
MeshTally::resetTally
virtual void resetTally() override
A function to reset the tally. MeshTally overrides this function to delete the OpenMC mesh.
MeshTally::_mesh_template
const openmc::LibMesh * _mesh_template
OpenMC unstructured mesh instance for use with mesh tallies.
Definition: MeshTally.h:92
MeshTally::spatialFilter
virtual std::pair< unsigned int, openmc::Filter * > spatialFilter() override
TallyBase.h
MeshTally::_mesh_filter
openmc::MeshFilter * _mesh_filter
OpenMC mesh filter for this unstructured mesh tally.
Definition: MeshTally.h:89
MeshTally::validParams
static InputParameters validParams()
MeshTally::_mesh_index
unsigned int _mesh_index
The index of the mesh added by this tally.
Definition: MeshTally.h:86
MeshTally::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
MeshTally::_mesh_translation
Point _mesh_translation
The translation to apply to the mesh template.
Definition: MeshTally.h:80
TallyBase
Definition: TallyBase.h:32
MeshTally::_instance
unsigned int _instance
The index into an array of mesh translations.
Definition: MeshTally.h:83
MeshTally
Definition: MeshTally.h:26
MeshTally::_mesh_template_filename
const std::string * _mesh_template_filename
Definition: MeshTally.h:77
MeshTally::MeshTally
MeshTally(const InputParameters &parameters)
OpenMCCellAverageProblem.h