MURE
Loading...
Searching...
No Matches
PinCell.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 _PIN_HXX_
20#define _PIN_HXX_
21
22#include <algorithm>
23#include <string>
24#include <vector>
25
26#include "Cell.hxx"
27
28class Material;
29
36
52class PinCell : public Cell
53{
54 public :
59 PinCell(int universe = 0);
60 PinCell(const PinCell &c);
61 ~PinCell() override;
62 PinCell *Clone() override
63 {
64 return new PinCell(*this);
65 }
72
74
79
89 void AddLayer(Material *mat, double R, double Volume = - 1);
91 void SetLayerMaterial(int i, Material *mat)
92 {
93 fMaterialVector[i] = mat;
94 }
95 double GetLayerRadius(int i);
97 {
98 return fR.size();
99 };
101
114 void SetSurroundingMaterial(Material *mat, double Volume = - 1);
116 {
117 return fSurroundingMaterial;
118 }
120 {
122 }
124
142 void Translate(double dx, double dy, double dz, bool ForceTranslation = false);
143 vector < double > &GetTranslation()
144 {
145 return fTranslation;
146 }
148 {
149 return fTrueTranslation;
150 }
151 bool IsTranslated();
152
160 void SetLayerVolume(int i, double V)
161 {
162 fLayerVolume[i] = V;
163 }
164 double GetLayerVolume(int i)
165 {
166 return fLayerVolume[i];
167 }
168
169 void AddSpatialVariable(int layeridx, string name, double value);
170 vector < string > &GetSpatialVariableNames(int layeridx)
171 {
172 return fPCSpatialVariableNames[layeridx];
173 }
174 vector < double > &GetSpatialVariables(int layeridx)
175 {
176 return fPCSpatialVariables[layeridx];
177 }
178 int GetUniverse() override
179 {
180 return fUniverse;
181 }
182 void SetUniverse(int u)
183 {
184 fUniverse = u;
185 }
195 {
196 fAssociatedCellNumber.push_back(num);
197 }
198 vector < int > &GetAssociatedCellNumber()
199 {
200 return fAssociatedCellNumber;
201 }
202 Cell *GetAssociatedCell(int i);
203
204 void SetAutoBuildingCells(bool flag)
205 {
206 fAutoBuildingCells = flag;
207 }
209 {
210 return fAutoBuildingCells;
211 }
212 void SetPinType(string type)
213 {
214 fPinType = type;
215 }
216 string GetPinType()
217 {
218 return fPinType;
219 }
220
221
222 void SetControlLayerNumber(int ControlLayerNumber)
223 {
224 fControlLayerNumber = ControlLayerNumber;
225 }
227 {
228 return fControlLayerNumber;
229 }
231
232
233 private:
234
235 vector < double > fR;
236 vector < double > fLayerVolume;
237 vector < Material * > fMaterialVector;
239
243
244 vector < int > fAssociatedCellNumber;
245
247 vector < double > fTranslation;
249
250 vector < vector < double > > fPCSpatialVariables;
251 vector < vector < string > > fPCSpatialVariableNames;
252 string fPinType;
253};
254
255#endif
Header file for Cell class.
A Cell is composed from a Shape and a Material.
Definition Cell.hxx:84
A Material constituing a Cell.
Definition Material.hxx:83
PinCell class allows to create cylindrical cell set included as Matrioshka.
Definition PinCell.hxx:53
void SetSurroundingMaterial(Material *mat, double Volume=- 1)
Definition PinCell.cxx:178
bool IsTrueTranslation()
Definition PinCell.hxx:147
void SetLayerVolume(int i, double V)
Definition PinCell.hxx:160
PinCell * Duplicate()
Definition PinCell.cxx:95
string fPinType
a type of pin (Fuel, Guide Tube, ...)
Definition PinCell.hxx:252
bool fAutoBuildingCells
True if the Connector::BuildPinCells is called from EvolutionSolver (with Auto flag=true)
Definition PinCell.hxx:246
Material * GetLayerMaterial(int i)
return the material of the layer i (i=0, innerest layer)
Definition PinCell.cxx:162
void SetControlLayerNumber(int ControlLayerNumber)
Definition PinCell.hxx:222
void SetUniverse(int u)
Definition PinCell.hxx:182
bool IsSurroundingMaterialCalled()
Definition PinCell.hxx:119
int fControlLayerNumber
the number of the layer containing the control material
Definition PinCell.hxx:241
int GetNumberOfLayer()
Definition PinCell.hxx:96
bool IsAutoBuildingCells()
Definition PinCell.hxx:208
vector< Material * > fMaterialVector
a vector of layer material
Definition PinCell.hxx:237
bool IsTranslated()
true if the PinCell has been translated
Definition PinCell.cxx:207
bool fTrueTranslation
if the translation is forced for Serpent (i.e., the translation is also done in Serpent)
Definition PinCell.hxx:248
vector< int > & GetAssociatedCellNumber()
Definition PinCell.hxx:198
Material * fSurroundingMaterial
the surrounding material
Definition PinCell.hxx:238
PinCell * Clone() override
Definition PinCell.hxx:62
void SetLayerMaterial(int i, Material *mat)
Definition PinCell.hxx:91
vector< string > & GetSpatialVariableNames(int layeridx)
Definition PinCell.hxx:170
void Translate(double dx, double dy, double dz, bool ForceTranslation=false)
Definition PinCell.cxx:213
vector< double > fR
a vector of radii
Definition PinCell.hxx:235
vector< double > & GetTranslation()
Definition PinCell.hxx:143
void AddLayer(Material *mat, double R, double Volume=- 1)
Definition PinCell.cxx:141
int GetControlLayerNumber()
Definition PinCell.hxx:226
void AddAssociatedCellNumber(int num)
Definition PinCell.hxx:194
vector< double > fLayerVolume
a vector of layer volumes
Definition PinCell.hxx:236
vector< double > & GetSpatialVariables(int layeridx)
Definition PinCell.hxx:174
double GetLayerVolume(int i)
Definition PinCell.hxx:164
void SetPinType(string type)
Definition PinCell.hxx:212
Material * GetSurroundingMaterial() const
Definition PinCell.hxx:115
vector< int > fAssociatedCellNumber
vector of associated cell number
Definition PinCell.hxx:244
string GetPinType()
Definition PinCell.hxx:216
vector< vector< double > > fPCSpatialVariables
Information on the cell's spatial position.
Definition PinCell.hxx:250
bool fIsSurroundingMaterialCalled
just to be sure that the surrounding material has been called
Definition PinCell.hxx:242
void AddSpatialVariable(int layeridx, string name, double value)
add Spatial variable to a layer or to the surrounding material
Definition PinCell.cxx:222
int fUniverse
the pin universe number
Definition PinCell.hxx:240
~PinCell() override
Definition PinCell.cxx:132
Cell * GetAssociatedCell(int i)
return the ith associated cell
Definition PinCell.cxx:191
int GetUniverse() override
Definition PinCell.hxx:178
vector< vector< string > > fPCSpatialVariableNames
Names of the spatial variables (e.g assemblyx, crayon#, ringradius)
Definition PinCell.hxx:251
vector< double > fTranslation
translation vector of the PinCell
Definition PinCell.hxx:247
double GetLayerRadius(int i)
return the radius of the layer i
Definition PinCell.cxx:170
void SetAutoBuildingCells(bool flag)
Definition PinCell.hxx:204

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