MURE
Loading...
Searching...
No Matches
MCNPTally.hxx
Go to the documentation of this file.
1/*
2 This file is part of MURE,
3 Copyright (C) 2007-2021 MURE developers.
4
5 MURE is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 MURE is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License
16 along with MURE. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19#ifndef _TALLY_HXX_
20#define _TALLY_HXX_
21
27#include <vector>
28#include <algorithm>
29#include <iosfwd>
30#include <string>
31
32using namespace std;
33
34#include "MureTally.hxx"
35#include "Shape.hxx"
36#include "Reaction.hxx"
37#include "Cell.hxx"
38#include "MureGroupBin.hxx"
39#include "MureSimpleBin.hxx"
40#include "MureLatticeBin.hxx"
42#include "MCSource.hxx"
44
45class Cell;
46class MureTallyBin;
47class PinCell;
48
49namespace MCNP
50{
51
55 };
56
57
59
69{
70 public:
72 SimpleBin(const SimpleBin &b) = default;
73 SimpleBin *Clone() override
74 {
75 return new SimpleBin(*this);
76 }
78 SimpleBin(PinCell *C, int layeridx): MureSimpleBin(C, layeridx) {}
80 SimpleBin(int universe): MureSimpleBin(universe) {}
81
82
83 string Print(int BeforeRparenthesis = 0) override;
84};
85
87
98class GroupBin : public MureGroupBin
99{
100 public:
102 GroupBin(const GroupBin &b) = default;
103 GroupBin *Clone() override
104 {
105 return new GroupBin(*this);
106 }
108 GroupBin(PinCell *C, int layeridx): MureGroupBin(C, layeridx) {}
110 GroupBin(MureTallyBin *theTallyBin): MureGroupBin(theTallyBin) {}
111 GroupBin(int universe): MureGroupBin(universe) {}
112
113 string Print(int BeforeRparenthesis = 0) override;
114};
115
117
131{
132 public:
133 LatticeBin(const LatticeBin &b) = default;
134 LatticeBin *Clone() override
135 {
136 return new LatticeBin(*this);
137 }
138 LatticeBin(Cell *C, string pos = ""): MureLatticeBin(C, pos) {}
139 LatticeBin(PinCell *C, int layeridx, string pos = ""): MureLatticeBin(C, layeridx, pos) {}
140 LatticeBin(MureTallyBin *theTallyBin): MureLatticeBin(theTallyBin) {};
141 LatticeBin(int universe): MureLatticeBin(universe) {}
142
143 string Print(int BeforeRparenthesis = 0) override;
144
145};
146
147
148
149
151
160class Tally: public MureTally
161{
162 public:
175 Tally(int type = kCellFlux, const char *particle = "N");
188 Tally(int type, int particle);
189 Tally(const Tally &t);
190 Tally *Clone() override
191 {
192 return new Tally(*this);
193 }
194 ~Tally() override = default;
195
212 void AddFluenceToDoseConversion(bool ELinear = false, bool CFLinear = false);
213
214 string Print() override;
215 string PrintMultiplicator() override;
216
231 void SetTallySpecialTreatment(string Treatment)
232 {
233 fTallySpecialTreatment = Treatment;
234 }
235
236 vector < double > GetBinVolume(int i) override;
237 double GetBinSurface(int i);
238 void SetBinSurface(int i, double S);
239 void SetBinVolume(int i, double V, int k = 0) override;
240
241 string GetParticle()
242 {
243 return fParticle;
244 }
246 {
247 fParticle = "N";
248 }
250 {
251 fParticle = "P";
252 }
254 {
255 fParticle = "N, P";
256 }
258 {
259 fParticle = "N, E";
260 }
262 {
263 fParticle = "N, P, E";
264 }
265 void SetParentheses(bool flag = true)
266 {
267 fParentheses = flag;
268 }
269
270 vector < double > GetEnergyBinningVector()
271 {
272 return fTimeEnergyGrid -> GetEnergyBins();
273 }
274
275 protected:
277
278 private:
279 string fParticle;
281 bool fStar;
282 vector < double > fEnergy;
283 vector < double > fConversionFactor;
287};
288
289
290}
291
292#endif
Header file for Cell class.
Header file for MCNP::TimeEnergyGrid class.
Header file for Monte-Carlo Source abstract class.
Header file for MureGroupBin class.
Header file for MureLatticeBin class.
Header file for MureSimpleBin class.
Header file for TallyMultiplicator and MureTally classes.
Header file for MureTimeEnergyGrid Abstract class.
Header file for Shape class and Shape_ptr type.
A Cell is composed from a Shape and a Material.
Definition Cell.hxx:84
Define MCNP group a cell or surface bin.
Definition MCNPTally.hxx:99
GroupBin(MureTallyBin *theTallyBin)
Build a Group Bin of type of TallyBin.
Definition MCNPTally.hxx:110
GroupBin(const GroupBin &b)=default
Copy constructor.
GroupBin * Clone() override
The "Virtual Copy Constructor".
Definition MCNPTally.hxx:103
GroupBin(PinCell *C, int layeridx)
Build a Group Bin of type Cell from a PinCell layer.
Definition MCNPTally.hxx:108
GroupBin(Shape_ptr S)
Build a Group Bin of type Surface.
Definition MCNPTally.hxx:109
GroupBin(int universe)
Build a Group Bin based on the universe shorthand, for cell type only.
Definition MCNPTally.hxx:111
GroupBin(Cell *C)
Build a Group Bin of type Cell.
Definition MCNPTally.hxx:107
GroupBin()
default constructor.
Definition MCNPTally.hxx:101
string Print(int BeforeRparenthesis=0) override
Print the MureTallyBin.
Definition MCNPTally.cxx:81
Define Lattice Cell type bin.
Definition MCNPTally.hxx:131
LatticeBin(const LatticeBin &b)=default
Copy constructor.
LatticeBin * Clone() override
The "Virtual Copy Constructor".
Definition MCNPTally.hxx:134
LatticeBin(MureTallyBin *theTallyBin)
Definition MCNPTally.hxx:140
LatticeBin(Cell *C, string pos="")
Build a Lattice Bin of type Cell.
Definition MCNPTally.hxx:138
LatticeBin(PinCell *C, int layeridx, string pos="")
Build a Lattice Bin of type Cell from a PinCell layer.
Definition MCNPTally.hxx:139
string Print(int BeforeRparenthesis=0) override
Print the MureTallyBin.
Definition MCNPTally.cxx:103
LatticeBin(int universe)
Build a Lattice Bin of type Cell only.
Definition MCNPTally.hxx:141
Define a MCNP Simple Bin.
Definition MCNPTally.hxx:69
string Print(int BeforeRparenthesis=0) override
Print the SimpleBin in MCNP.
Definition MCNPTally.cxx:51
SimpleBin(Shape_ptr S)
constructor for a Surface bin
Definition MCNPTally.hxx:79
SimpleBin(PinCell *C, int layeridx)
constructor for Cell bin from a PinCell layer
Definition MCNPTally.hxx:78
SimpleBin()
default constructor.
Definition MCNPTally.hxx:71
SimpleBin(Cell *C)
constructor for a Cell bin
Definition MCNPTally.hxx:77
SimpleBin * Clone() override
The "Virtual Copy Constructor".
Definition MCNPTally.hxx:73
SimpleBin(int universe)
constructor for a universe bin
Definition MCNPTally.hxx:80
SimpleBin(const SimpleBin &b)=default
Copy constructor.
Define a MCNP Tally.
Definition MCNPTally.hxx:161
string PrintMultiplicator() override
Print the Tally Multiplicator in MCNP.
Definition MCNPTally.cxx:333
vector< double > fConversionFactor
fluence-to-dose conversion factor (FTD)
Definition MCNPTally.hxx:283
string Print() override
Print the Tally in MCNP.
Definition MCNPTally.cxx:260
TimeEnergyGrid * GetNewTimeEnergyGrid() override
return a Time &Energy grid
Definition MCNPTally.cxx:447
bool fELinearFTD
whether linear or log interpolation is done on fEnergy for FTD
Definition MCNPTally.hxx:284
~Tally() override=default
Destructor.
void AddFluenceToDoseConversion(bool ELinear=false, bool CFLinear=false)
Definition MCNPTally.cxx:405
string fParticle
Particle Type (N, P, ..)
Definition MCNPTally.hxx:279
vector< double > GetBinVolume(int i) override
returns the ith bin volume of Tally bin
Definition MCNPTally.cxx:360
void SetBinSurface(int i, double S)
set the ith bin surface of Tally bin
Definition MCNPTally.cxx:399
void SetBinVolume(int i, double V, int k=0) override
set the ith bin volume of (the kth partial bin in a LatticeBin) Tally bin
Definition MCNPTally.cxx:383
string GetParticle()
Definition MCNPTally.hxx:241
void SetParticleNP()
Definition MCNPTally.hxx:253
vector< double > GetEnergyBinningVector()
Definition MCNPTally.hxx:270
void SetParticleNPE()
Definition MCNPTally.hxx:261
void SetParentheses(bool flag=true)
Definition MCNPTally.hxx:265
void SetParticleN()
Definition MCNPTally.hxx:245
vector< double > fEnergy
Energy bin vector.
Definition MCNPTally.hxx:282
bool fParentheses
Enclose bins in parentheses.
Definition MCNPTally.hxx:280
void SetParticleP()
Definition MCNPTally.hxx:249
bool fStar
true if fType < 0 use if you want to print a * before f (for instance *f8:P change the unit of the ta...
Definition MCNPTally.hxx:281
Tally * Clone() override
The only good way to call copy constructor.
Definition MCNPTally.hxx:190
void SetTallySpecialTreatment(string Treatment)
Definition MCNPTally.hxx:231
void SetParticleNE()
Definition MCNPTally.hxx:257
double GetBinSurface(int i)
returns the ith bin surface of Tally bin
Definition MCNPTally.cxx:372
bool fCFLinearFTD
whether linear or log interpolation is done on FTD
Definition MCNPTally.hxx:285
string fTallySpecialTreatment
Definition MCNPTally.hxx:286
Define a Time and/or Energy Grid for tallies.
Definition MCNPTimeEnergyGrid.hxx:47
Define group cell or surface bin.
Definition MureGroupBin.hxx:58
Define Lattice Cell type bin.
Definition MureLatticeBin.hxx:58
Define a general Simple Tally Bin (cell, universe or surface).
Definition MureSimpleBin.hxx:69
Define a general Tally Bin.
Definition MureTallyBin.hxx:62
Define a MURE Tally.abstract class.
Definition MureTally.hxx:141
MureTimeEnergyGrid * fTimeEnergyGrid
store time &/or energy grid
Definition MureTally.hxx:323
PinCell class allows to create cylindrical cell set included as Matrioshka.
Definition PinCell.hxx:53
This MCNP (concrete) class is used to built a reactor assembly.
Definition MCNPBrick.hxx:41
TallyType
Define tally type according to MCNP notation (1=Current/surf, 2=flux/surf, 4=flux/cell,...
Definition MCNPTally.hxx:53
@ kCellFlux
Definition MCNPTally.hxx:53
@ kSurfaceCurrent
Definition MCNPTally.hxx:53
@ kEnergyDeposition
Definition MCNPTally.hxx:54
@ kSurfaceFlux
Definition MCNPTally.hxx:53
@ kFissionEnergyDeposition
Definition MCNPTally.hxx:54
the namespace of the Standard C++

MURE Project, documentation generated by Doxygen 1.9.7 - Fri Jan 19 2024