MURE
Loading...
Searching...
No Matches
MureSimpleBin.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 _MURESIMPLEBIN_HXX_
20#define _MURESIMPLEBIN_HXX_
21
27#include <vector>
28#include <iosfwd>
29#include <string>
30
31using namespace std;
32
33#include "Shape.hxx"
34#include "Reaction.hxx"
35#include "Cell.hxx"
36#include "PinCell.hxx"
37#include "LatticeCell.hxx"
38#include "MureTallyBin.hxx"
39#include "MCSource.hxx"
40
41class Cell;
42class PinCell;
43
45
60
69{
70 public:
73 MureSimpleBin(PinCell *C, int layeridx);
75 MureSimpleBin(int universe);
77 MureTallyBin *Clone() override
78 {
79 return new MureSimpleBin(*this);
80 }
81 ~MureSimpleBin() override = default;
82
83 void Add(Shape_ptr S);
84 void Add(Cell *C);
85 void Add(PinCell *C, int layeridx);
86 void Add(int universe);
87
88 bool IsSimpleBin() override
89 {
90 return 1;
91 }
92 string Print(int BeforeRparenthesis = 0) override;
93 string PrintVolume() override;
94 bool IsInBin(int num) override;
95 bool IsInBin(Cell *C) override;
96 bool IsInBin(Shape_ptr S) override;
97 int GetBinContent(int i)
98 {
99 return fBin;
100 }
101 double RescanVolume() override;
103 {
104 return fCell;
105 }
106 void UpdateTallyBinVolume() override;
107
108 protected:
109
112 int fBin;
113 vector < int > fCellNumber;
114};
115
116
117
118#endif
Header file for Cell class.
Header file for Monte-Carlo Source abstract class.
Header file for MureTallyBin abstract class.
Header file for PinCell 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 a general Simple Tally Bin (cell, universe or surface).
Definition MureSimpleBin.hxx:69
Shape_ptr fShape
the Shape of a Surface type simple bin
Definition MureSimpleBin.hxx:111
~MureSimpleBin() override=default
Destructor.
int fBin
the Cell/Surface/Universe num contains in the tally bin
Definition MureSimpleBin.hxx:112
double RescanVolume() override
Reread bin and assign necessary volume when known.
Definition MureSimpleBin.cxx:358
vector< int > fCellNumber
Only use to store cell number for universe bin.
Definition MureSimpleBin.hxx:113
void UpdateTallyBinVolume() override
Reread all bins and assign necessary volume.
Definition MureSimpleBin.cxx:331
MureTallyBin * Clone() override
The "Virtual Copy Constructor".
Definition MureSimpleBin.hxx:77
void Add(Shape_ptr S)
Set a Shape_ptr to a Simple Bin (Surface tally)
Definition MureSimpleBin.cxx:106
bool IsSimpleBin() override
Definition MureSimpleBin.hxx:88
string PrintVolume() override
Print the Simple Bin Volume(s) for SD cards in MCNP or dv card in Serpent.
Definition MureSimpleBin.cxx:220
int GetBinContent(int i)
Definition MureSimpleBin.hxx:97
bool IsInBin(int num) override
whether or not the universe "num" is in the bin
Definition MureSimpleBin.cxx:287
MureSimpleBin()
Build a Simple Bin of unknown type (the MureSimpleBin::Add() will decide).
Definition MureSimpleBin.cxx:51
string Print(int BeforeRparenthesis=0) override
Print the Simple Bin (dummy)
Definition MureSimpleBin.cxx:212
Cell * fCell
the Cell of a Cell type simple bin
Definition MureSimpleBin.hxx:110
Cell * GetCell()
Definition MureSimpleBin.hxx:102
Define a general Tally Bin.
Definition MureTallyBin.hxx:62
PinCell class allows to create cylindrical cell set included as Matrioshka.
Definition PinCell.hxx:53
the namespace of the Standard C++

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