MURE
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
EWrapper.hxx
Go to the documentation of this file.
1 #include <fstream>
2 #include <cmath>
3 #include <sstream>
4 #include <libmctal/TMTally.hxx>
5 #include <libmctal/TMComment.hxx>
6 #include <libmctal/TMctal.hxx>
7 #include "MureHeaders.hxx"
8 
9 using namespace std;
10 
24 class MatX
25 {
26  public:
27  MatX(){M=NULL;}
28  MatX(const MatX &mx);
29  ~MatX(){}
30 
32  double X;
33 };
34 
36 typedef vector<MatX> MatXX;
37 
38 
48  {
49  public:
50  CellOccupy(){C=NULL;}
51  CellOccupy(const CellOccupy &co);
53 
54  Cell *C;
55  vector<int> X;
56  vector<int> Y;
57  vector<int> Z;
58  int Universe;
59  };
60 
69  {
70  public:
72  ReshufflingScheme(){fLattice=NULL;}
78  void AddChain(
79  vector<Cell*> Chain
80  );
82  void StartChain();
84  void AddToChain(Cell* C);
87  Cell* Lat
88  ){fLattice=Lat;}
90  void Proceed();
91 
92  private:
96  vector< vector<CellOccupy> > fChains;
97  };
98 
232 {
233  public:
234 
236  EvolutionWrapper();
240  EvolutionControl* Clone(){return new EvolutionWrapper(*this);}
243 
249  void PrintMaterialDensity(Material* M) {outDens.push_back(M);}
250  void PrintMaterialTemperature(Material* M) {outTemp.push_back(M);}
251  void PrintMaterialBoron(Material* M){outBoron.push_back(M);}
252  void PrintFinalComposition(Material* M, string Title) {FCMats.push_back(M);FCTitles.push_back(Title);}
254  void PrintFinalCompositionNuclide(int Z, int A);
256  void SetOutFile(string fn){fOutFilename=fn;}
257 
258 
264  void ControlAtEachMCNPStep();
265  void ControlAtEachRKStep();
266  void ControlAfterEndOfRKIntegration();
267 
268 
270 
274  void Evolve(
275  int start=0,
276  string startd=""
277  );
278 
284 
293  void AddPhase(
294  float T,
295  int steps,
296  int dlog=0,
297  float bas=2
298  );
300  void SetPowerConstant(
301  float P
302  );
304  void SetPowerLinear(
305  float P1,
306  float P2
307  );
309  void SetPowerCooling();
311  void SetMaterialTemperature(
312  Material* M,
313  float X
314  );
316  void SetMaterialBoron(
317  Material* M,
318  float X
319  );
321  void SetMaterialBoronLinear(
322  Material* M,
323  float Content1,
324  float Content2
325  );
327  void SetMaterialDensity(Material* M, float X);
329 
330 
333  void AddTally(Tally* t,int* index);
335 
340  void Reshuffle(Cell* CLatGen);
341  void ReshuffleAddChain(vector<Cell*> Chain);
342  void ReshuffleStartChain();
343  void ReshuffleAddToChain(Cell* C);
344 
345  vector<vector<ValErr_t> >& GetTallyValues(){return fTallyValues;}
346  vector<double>& GetBurnup(){return fBurnup;}
347 
348  void AddSumTally(Cell* c,Reaction* r,int* index);
349 
350  vector<ValErr_t>& GetSumTallyValues(int SumTally){return fSumTallyValues[SumTally];}
351  void SetSumTallyEnergies(int nE,double* E);
352 
353  protected:
354 
355  vector<double> fPower;
356 
357  private:
358 
361  vector<Reaction*> fSumTallyReactions;
362  vector<Cell*> fSumTallyCells;
363  vector<int*> fSumTallyIndices;
364  vector<vector<ValErr_t> > fSumTallyValues;
365 
366  vector<ReshufflingScheme*> fRS;
367  vector<int> fPhaseStep;
368  vector<int> fPhaseCum;
369  vector<double> fTime;
370  vector<bool> fCool;
371  vector<MatXX> MatTTs;
372  vector<MatXX> MatBBs;
373  vector<MatXX> MatDDs;
374  vector<string> FCTitles;
375  vector<Material*> FCMats;
376  vector<int> FCZ,
377  FCA;
378  vector<int*> fTallies;
379  vector<vector<ValErr_t> > fTallyValues;
380  vector<double> fBurnup;
381  ofstream fOutFile;
382  string fOutFilename;
383 
384  vector<Material*> outTemp;
385  vector<Material*> outDens;
386  vector<Material*> outBoron;
387 
388  void BuildSumTallies();
389  void EvaluateSumTallies();
390 
391  void outT(int start=0);
392  void outD(int start=0);
393  void outB(int start=0);
394  void outH(int start=0);
395  void PrepareTemperatureEvolution();
396 
397  void UpdatePower(int step);
398  void UpdateTempBoronDens(int step);
399  void UpdateTallies();
400 };
401 
~MatX()
Destructor.
Definition: EWrapper.hxx:29
vector< MatXX > MatDDs
Vector of (vector of materials) with changing density.
Definition: EWrapper.hxx:373
vector< int > Y
Vector of Y-coordinates of the positions.
Definition: EWrapper.hxx:56
vector< int > FCZ
Z of isotopes for final composition.
Definition: EWrapper.hxx:376
A Cell is a MCNP cell.
Definition: Cell.hxx:48
vector< ReshufflingScheme * > fRS
Reshuffling schemes for lattice cores.
Definition: EWrapper.hxx:366
ReshufflingScheme()
Normal constructor.
Definition: EWrapper.hxx:72
vector< double > fPower
fPower vector (watts)
Definition: EWrapper.hxx:355
double * fSumTallyEnergies
Definition: EWrapper.hxx:359
vector< Material * > FCMats
Materials for final composition.
Definition: EWrapper.hxx:375
double X
The value.
Definition: EWrapper.hxx:32
vector< MatX > MatXX
Vector of material-value pairs.
Definition: EWrapper.hxx:36
vector< ValErr_t > & GetSumTallyValues(int SumTally)
Definition: EWrapper.hxx:350
vector< bool > fCool
vector of flags denoting the cooling periods
Definition: EWrapper.hxx:370
void PrintMaterialTemperature(Material *M)
Require printing of temperature of M.
Definition: EWrapper.hxx:250
vector< double > & GetBurnup()
Definition: EWrapper.hxx:346
~CellOccupy()
Destructor.
Definition: EWrapper.hxx:52
vector< string > FCTitles
Titles of materials for final composition.
Definition: EWrapper.hxx:374
vector< double > fBurnup
Definition: EWrapper.hxx:380
Structure holding Material and a number (e.g. density, temperature etc.)
Definition: EWrapper.hxx:24
Cell * C
The cell pointer.
Definition: EWrapper.hxx:54
vector< Material * > outTemp
Vector of materials where temperature is to be plotted.
Definition: EWrapper.hxx:384
vector< int > fPhaseStep
Number of MCNP steps in this phase.
Definition: EWrapper.hxx:367
MatX()
Normal constructor.
Definition: EWrapper.hxx:27
ofstream fOutFile
Output file for evolution table.
Definition: EWrapper.hxx:381
vector< int * > fSumTallyIndices
Definition: EWrapper.hxx:363
vector< int > X
Vector of X-coordinates of the positions.
Definition: EWrapper.hxx:55
Define a MCNP Tally.
Definition: Tally.hxx:324
vector< Material * > outBoron
Vector of materials where boron is to be plotted.
Definition: EWrapper.hxx:386
Cell * fLattice
Cell containing the lattice.
Definition: EWrapper.hxx:94
vector< vector< ValErr_t > > fSumTallyValues
Definition: EWrapper.hxx:364
vector< int > fPhaseCum
Number of MCNP steps before this phase (cumulative)
Definition: EWrapper.hxx:368
void PrintFinalComposition(Material *M, string Title)
Dump final composition of M with title.
Definition: EWrapper.hxx:252
Define a Reaction list for Tally multiplicator inputs.
Definition: Tally.hxx:233
File including all headers.
vector< int * > fTallies
Definition: EWrapper.hxx:378
void SetLatticeCell(Cell *Lat)
Set the cell containing the lattice.
Definition: EWrapper.hxx:86
vector< int > Z
Vector of Z-coordinates of the positions.
Definition: EWrapper.hxx:57
vector< Material * > outDens
Vector of materials where density is to be plotted.
Definition: EWrapper.hxx:385
vector< vector< ValErr_t > > fTallyValues
Definition: EWrapper.hxx:379
Front-end class for Evolution(): enables easy and comprehensive specification of operation history...
Definition: EWrapper.hxx:231
vector< Reaction * > fSumTallyReactions
Definition: EWrapper.hxx:361
A Material constituing a Cell.
Definition: Material.hxx:53
vector< double > fTime
fTime vector (ends of steps)
Definition: EWrapper.hxx:369
void PrintMaterialBoron(Material *M)
Require printing of boron content of M.
Definition: EWrapper.hxx:251
This class performs reshuffling of a lattice.
Definition: EWrapper.hxx:68
vector< MatXX > MatBBs
Vector of (vector of materials) with changing boron.
Definition: EWrapper.hxx:372
CellOccupy()
Normal constructor.
Definition: EWrapper.hxx:50
string fOutFilename
output file name
Definition: EWrapper.hxx:382
vector< Cell * > fSumTallyCells
Definition: EWrapper.hxx:362
~ReshufflingScheme()
Destructor.
Definition: EWrapper.hxx:76
int Universe
the cell universe
Definition: EWrapper.hxx:58
~EvolutionWrapper()
Destructor.
Definition: EWrapper.hxx:242
This class holds a list of all positions in the core lattice occupied by one cell (one universe numbe...
Definition: EWrapper.hxx:47
Material * M
The material.
Definition: EWrapper.hxx:31
vector< vector< ValErr_t > > & GetTallyValues()
Definition: EWrapper.hxx:345
vector< vector< CellOccupy > > fChains
List of reshuffling chains.
Definition: EWrapper.hxx:96
EvolutionControl * Clone()
Object cloning.
Definition: EWrapper.hxx:240
int fSumTallyEnergiesN
Definition: EWrapper.hxx:360
void PrintMaterialDensity(Material *M)
Require printing of density of M.
Definition: EWrapper.hxx:249
void SetOutFile(string fn)
Setup printing to file fn.
Definition: EWrapper.hxx:256
EvolutionControl allows interactions with the evolution.
Definition: EvolutionControl.hxx:35
vector< MatXX > MatTTs
Vector of (vector of materials) with changing temperature.
Definition: EWrapper.hxx:371

MURE Project, documentation generated by Doxygen 1.8.5 - Mon Nov 17 2014