MURE
Loading...
Searching...
No Matches
MureTallyBin.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 _MURETALLYBIN_HXX_
20#define _MURETALLYBIN_HXX_
26#include <vector>
27#include <algorithm>
28#include <iosfwd>
29#include <string>
30
31#include "MCSource.hxx"
32
33class Cell;
34
35using namespace std;
36
37const double CubicMeter2CubicCentimeter = 1e6;
39
43 };
44
46
62{
63 public:
64 MureTallyBin(const MureTallyBin &b);
65 MureTallyBin();
66 virtual ~MureTallyBin() = default;
67 virtual MureTallyBin *Clone() = 0;
68
69 virtual bool IsSimpleBin()
70 {
71 return 0;
72 }
73 virtual bool IsGroupBin()
74 {
75 return 0;
76 }
77 virtual bool IsLatticeBin()
78 {
79 return 0;
80 }
82
86 int GetType()
87 {
88 return fBinType;
89 }
90 void SetType(int type)
91 {
92 fBinType = type;
93 }
95 {
96 return (fBinType == 0);
97 }
98 bool IsCellBin()
99 {
100 return (fBinType == 1);
101 }
103 {
104 return (fBinType == 2);
105 }
106
107 virtual string Print(int BeforeRparenthesis = 0) = 0;
108 virtual string PrintVolume();
112 virtual bool NeedVolume();
114
117 vector < double > GetVolume()
118 {
119 return fVolume;
120 }
122
125 double GetVolume(int i)
126 {
127 return fVolume[i];
128 }
129 double GetSurface()
130 {
131 return fSurface;
132 }
134 {
135 return fVolume.size();
136 }
138
146 void SetSurface(double S, bool Inc = false);
148
157 void SetVolume(double V, int i = 0, bool Inc = false);
158 virtual bool IsInBin(int num)
159 {
160 return false;
161 }
162 virtual bool IsInBin(Cell *C)
163 {
164 return false;
165 }
166 virtual bool IsInBin(Shape_ptr S)
167 {
168 return false;
169 }
170 void SetBinVolume(vector < double > V);
171 virtual double RescanVolume()
172 {
173 return 0;
174 }
175 virtual void UpdateTallyBinVolume() = 0;
177 {
178 return fIsPinCellBin;
179 }
180 void SetPinCellBin(bool flag)
181 {
182 fIsPinCellBin = flag;
183 }
184
185 protected:
186 MureTallyBin(int bintype, vector < double > vol, double surf);
187
189 vector < double > fVolume;
190 double fSurface;
192
193};
194
195
196#endif
Header file for Monte-Carlo Source abstract class.
const double CubicMeter2CubicCentimeter
Definition MureTallyBin.hxx:37
TallyType
Define tally type according to MCNP notation (1=Current/surf, 2=flux/surf, 4=flux/cell,...
Definition MureTallyBin.hxx:41
@ kCellFlux
Definition MureTallyBin.hxx:41
@ kSurfaceFlux
Definition MureTallyBin.hxx:41
@ kSurfaceCurrent
Definition MureTallyBin.hxx:41
@ kFissionEnergyDeposition
Definition MureTallyBin.hxx:42
@ kEnergyDeposition
Definition MureTallyBin.hxx:42
const double SquareMeter2SquareCentimeter
Definition MureTallyBin.hxx:38
A Cell is composed from a Shape and a Material.
Definition Cell.hxx:84
Define a general Tally Bin.
Definition MureTallyBin.hxx:62
double GetVolume(int i)
retruns the ith bin volume vector.
Definition MureTallyBin.hxx:125
bool IsUniverseBin()
Definition MureTallyBin.hxx:102
virtual string PrintVolume()
Print the Volume of the bin.
Definition MureTallyBin.cxx:75
vector< double > fVolume
bin volume vector (1 value except for LatticeBin or Universe)
Definition MureTallyBin.hxx:189
bool IsCellBin()
Definition MureTallyBin.hxx:98
void SetBinVolume(vector< double > V)
Set volume(s) to bin(s)
Definition MureTallyBin.cxx:134
vector< double > GetVolume()
retruns the bin volume vector.
Definition MureTallyBin.hxx:117
virtual MureTallyBin * Clone()=0
The "Virtual Copy Constructor".
bool fIsPinCellBin
if the cell type bin is from a PinCell
Definition MureTallyBin.hxx:191
virtual bool IsInBin(Cell *C)
Definition MureTallyBin.hxx:162
int GetType()
returns -1, 0, 1 or 2 in function of the bin type.
Definition MureTallyBin.hxx:86
int fBinType
type of the bin (-1=unknown, 0=surface, 1=cell, 2=universe)
Definition MureTallyBin.hxx:188
bool IsSurfaceBin()
Definition MureTallyBin.hxx:94
virtual string Print(int BeforeRparenthesis=0)=0
Print the MureTallyBin.
int GetNumberOfVolume()
Definition MureTallyBin.hxx:133
virtual void UpdateTallyBinVolume()=0
Reread all bins and assign necessary volume.
virtual bool NeedVolume()
Definition MureTallyBin.cxx:67
virtual bool IsLatticeBin()
Definition MureTallyBin.hxx:77
void SetVolume(double V, int i=0, bool Inc=false)
set the bin volume of ith partial bin.
Definition MureTallyBin.cxx:106
virtual bool IsGroupBin()
Definition MureTallyBin.hxx:73
virtual ~MureTallyBin()=default
Destructor.
bool IsPinCellBin()
Definition MureTallyBin.hxx:176
double GetSurface()
Definition MureTallyBin.hxx:129
virtual bool IsInBin(Shape_ptr S)
Definition MureTallyBin.hxx:166
virtual bool IsInBin(int num)
Definition MureTallyBin.hxx:158
MureTallyBin()
Normal Construcator.
Definition MureTallyBin.cxx:39
void SetPinCellBin(bool flag)
Definition MureTallyBin.hxx:180
void SetType(int type)
Definition MureTallyBin.hxx:90
virtual bool IsSimpleBin()
Definition MureTallyBin.hxx:69
void SetSurface(double S, bool Inc=false)
Set the bin area.
Definition MureTallyBin.cxx:96
virtual double RescanVolume()
Definition MureTallyBin.hxx:171
double fSurface
bin surface
Definition MureTallyBin.hxx:190
the namespace of the Standard C++

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