MURE
Loading...
Searching...
No Matches
LatticeCell.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 _LatticeCell_HXX_
20#define _LatticeCell_HXX_
21
22#include <libValErr/ValErr.hxx>
23#include <algorithm>
24#include <vector>
25
26#include "Cell.hxx"
27#include "PinCell.hxx"
28#include "MCSource.hxx"
29#include "Shape.hxx"
30#include "TReference.hxx"
31
32class Material;
33class PinCell;
34
35
36
38
68class LatticeCell : public Cell
69{
70 public :
76
105 LatticeCell(Shape_ptr theLatticeGenerator, Material *theMaterial = nullptr, int theImportance = 1, double theTemperature = - 1);
106 LatticeCell(const LatticeCell &c);
107 Cell *Clone() override
108 {
109 return new LatticeCell(*this);
110 }
111 ~LatticeCell() override;
112
114
119
121
128 void SetNumberOfLatticeElement(int Nx, int Ny, int Nz = 1 );
130 {
131 return fNx;
132 }
134 {
135 return fNy;
136 }
138 {
139 return fNz;
140 }
141
143
152 void SetLatticeRange(int Xmin = 0, int Xmax = 0, int Ymin = 0, int Ymax = 0, int Zmin = 0, int Zmax = 0);
153
155
159 vector < vector < int > > &GetLatticeElementRange()
160 {
161 return fLatticeRange;
162 }
164 {
165 return fLatticeRange[0][0];
166 }
168 {
169 return fLatticeRange[0][1];
170 }
172 {
173 return fLatticeRange[1][0];
174 }
176 {
177 return fLatticeRange[1][1];
178 }
180 {
181 return fLatticeRange[2][0];
182 }
184 {
185 return fLatticeRange[2][1];
186 }
187
189
194
196
202 int FillLattice(int Universe, int *Pos = nullptr, int Trans = 0);
203
205
212 int FillLattice(Shape_ptr theShape, int *Pos = nullptr, int OldUniverse = 0, int Trans = 0);
213
215
221 int FillLattice(PinCell *Pin, int *Pos = nullptr, int Trans = 0);
223
224
229
231
235 vector < double > GetPitch();
236 vector < double > GetOrigin() const
237 {
238 return fOrigin;
239 }
240 int GetUniverse() override
241 {
242 return fShape -> GetUniverse();
243 }
244 vector < vector < vector < int > > > &GetLattice()
245 {
246 return fLattice;
247 }
248 vector < vector < int > > &GetLatticeRange()
249 {
250 return fLatticeRange;
251 }
252 vector < vector < vector < int > > > &GetTransLattice()
253 {
254 return fTransLattice;
255 }
256 int GetLattice(int *Pos);
259
260
261
262 private:
263 void InitLattice();
264
265 vector < vector < int > > fLatticeRange;
266 vector < vector < vector < int > > > fLattice;
267 vector < vector < vector < int > > > fTransLattice;
268 int fNx;
269 int fNy;
270 int fNz;
273 vector < double > fOrigin;
274};
275
276#endif
Header file for Cell class.
Header file for Monte-Carlo Source abstract class.
Header file for PinCell class.
Header file for Shape class and Shape_ptr type.
Header file for TReference class and Reference_ptr template.
A Cell is composed from a Shape and a Material.
Definition Cell.hxx:84
Shape_ptr fShape
Shape of the Cell.
Definition Cell.hxx:611
A LatticeCell is used to fill a cell with universes..
Definition LatticeCell.hxx:69
bool IsLatticeFullyFilled()
verify that all lattice elements have been filled ; print a warning if not.
Definition LatticeCell.cxx:170
int fNy
number of element along Y
Definition LatticeCell.hxx:269
int GetMinLatticeRange_Z()
Definition LatticeCell.hxx:179
vector< double > fOrigin
the lattice origin (i.e. of the ShapeGenerator)
Definition LatticeCell.hxx:273
bool fIsInit
Whether or not fLattice has been initialiazed.
Definition LatticeCell.hxx:271
int GetNumberOfLatticeElement_Z()
Definition LatticeCell.hxx:137
vector< vector< vector< int > > > fLattice
the lattice array containing universe number
Definition LatticeCell.hxx:266
int GetMinLatticeRange_Y()
Definition LatticeCell.hxx:171
int fNx
number of element along X
Definition LatticeCell.hxx:268
void SetNumberOfLatticeElement(int Nx, int Ny, int Nz=1)
Definition of the Lattice size (number of elements).
Definition LatticeCell.cxx:93
int GetMinLatticeRange_X()
Definition LatticeCell.hxx:163
bool fIsFilled
Whether or not fLattice has been filled.
Definition LatticeCell.hxx:272
int GetMaxLatticeRange_Y()
Definition LatticeCell.hxx:175
int GetNumberOfLatticeElement_Y()
Definition LatticeCell.hxx:133
void SetLatticeRange(int Xmin=0, int Xmax=0, int Ymin=0, int Ymax=0, int Zmin=0, int Zmax=0)
Definition of the Lattice range (extension).
Definition LatticeCell.cxx:122
vector< vector< vector< int > > > & GetTransLattice()
Definition LatticeCell.hxx:252
int fNz
number of element along Z
Definition LatticeCell.hxx:270
vector< vector< int > > & GetLatticeElementRange()
Get the Lattice range vector.
Definition LatticeCell.hxx:159
vector< double > GetPitch()
Returns a pitch vector of the Lattice.
Definition LatticeCell.cxx:292
~LatticeCell() override
destructor
int GetUniverse() override
Definition LatticeCell.hxx:240
int GetNumberOfLatticeElement_X()
Definition LatticeCell.hxx:129
vector< vector< int > > & GetLatticeRange()
Definition LatticeCell.hxx:248
int GetMaxLatticeRange_Z()
Definition LatticeCell.hxx:183
vector< vector< vector< int > > > fTransLattice
the lattice array containing transformation number
Definition LatticeCell.hxx:267
Cell * Clone() override
Definition LatticeCell.hxx:107
int FillLattice(int Universe, int *Pos=nullptr, int Trans=0)
Fill a Cell Lattice with Universe.
Definition LatticeCell.cxx:207
void InitLattice()
initialize fLattice &fTransLattice vector
Definition LatticeCell.cxx:146
vector< vector< int > > fLatticeRange
the lattice range if exists
Definition LatticeCell.hxx:265
vector< vector< vector< int > > > & GetLattice()
Definition LatticeCell.hxx:244
vector< double > GetOrigin() const
Definition LatticeCell.hxx:236
int GetMaxLatticeRange_X()
Definition LatticeCell.hxx:167
A Material constituing a Cell.
Definition Material.hxx:83
PinCell class allows to create cylindrical cell set included as Matrioshka.
Definition PinCell.hxx:53

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