CLASS  1.1
 Tout Classes Fichiers Fonctions Variables Définitions de type
Référence de la classe Storage

#include "Storage.hxx"

+ Graphe d'héritage de Storage:
+ Graphe de collaboration de Storage:

Fonctions membres publiques

 Storage ()
 < Normal Constructor. Plus de détails...
 
 Storage (LogFile *log)
 Advanced Constructor. Plus de détails...
 
 Storage (LogFile *log, DataBank< ZAI > *evolutivedb)
 Normal Destructor. Plus de détails...
 
 ~Storage ()
 
void SetId (int id)
 Set The Storage Parc'Id. Plus de détails...
 
void SetParc (CLASS *parc)
 Set the Pointer to the Parc. Plus de détails...
 
void SetLog (LogFile *Log)
 Set the Pointer to the Log. Plus de détails...
 
void SetDecayDataBase (DataBank< ZAI > *ddb)
 Set the pointer to the Decay DataBase. Plus de détails...
 
void SetStock (vector< IsotopicVector > IVsstock)
 Set The Storage isotopicVector. Plus de détails...
 
int GetId () const
 Return the Storage Parc'Is. Plus de détails...
 
LogFileGetLog () const
 Return the Pointer to the Log. Plus de détails...
 
CLASSGetParc () const
 return the Pointer to the Parc Plus de détails...
 
double GetInternalTime () const
 Return Creation Time. Plus de détails...
 
DataBank< ZAI > * GeDecayDataBase () const
 Return the pointer to the Decay DataBase. Plus de détails...
 
vector< IsotopicVectorGetStock () const
 Return the Storage IsotopicVector. Plus de détails...
 
IsotopicVector GetFullStock () const
 Return the Full Storage. Plus de détails...
 
void ClearStock ()
 
void AddToStock (ZAI zai, double quantity)
 Add a ZAI*quantity to the Storage. Plus de détails...
 
void AddToStock (IsotopicVector isotopicvector)
 Add an Isotopicvector to the Storage. Plus de détails...
 
void AddToFullStock (ZAI zai, double quantity)
 Add a ZAI*quantity to the Storage. Plus de détails...
 
void AddToFullStock (IsotopicVector isotopicvector)
 Add a IsotopicVector to the Storage. Plus de détails...
 
void TakeFractionFromStock (int IVId, double fraction)
 Take a part from an IV in sotck;. Plus de détails...
 
void TakeFromStock (IsotopicVector isotopicvector)
 
void Write (string filename, cSecond date=-1)
 
void Evolution (cSecond t)
 Performe the evolution until the Time t. Plus de détails...
 

Fonctions membres protégées

IsotopicVector GetDecay (IsotopicVector isotopicvector, cSecond t)
 Get IsotopicVector Decay at the t time. Plus de détails...
 
void StorageEvolution (cSecond t)
 Deal the Storage Decay Evolution. Plus de détails...
 
 ClassDef (Storage, 1)
 

Attributs protégés

int fId
 Identity of the Reactor inside the Parc. Plus de détails...
 
cSecond fInternalTime
 Internal Clock. Plus de détails...
 
CLASSfParc
 Pointer to the Parc. Plus de détails...
 
LogFilefLog
 Pointer to the Log. Plus de détails...
 
DataBank< ZAI > * fDecayDataBase
 Pointer to the Decay DataBase. Plus de détails...
 
vector< IsotopicVectorfIVStock
 
IsotopicVector fIVFullStock
 Full Storage conglomerat. Plus de détails...
 

Description détaillée

Définition à la ligne 29 du fichier Storage.hxx.

Documentation des constructeurs et destructeur

Storage::Storage ( )

< Normal Constructor.

Storage::Storage ( LogFile log)

Advanced Constructor.

Définition à la ligne 31 du fichier Storage.cxx.

32 {
33 
34  fLog = log;
35 
36  cout << "!!INFO!! !!!Storage!!! A new Storage has been define." << endl;
37 
38  fLog->fLog << "!!INFO!! !!!Storage!!! A new Storage has been define." << endl;
39 
40 }
Storage::Storage ( LogFile log,
DataBank< ZAI > *  evolutivedb 
)

Normal Destructor.

Définition à la ligne 42 du fichier Storage.cxx.

43 {
44 
45  fLog = log;
46  fInternalTime = 0;
47  fDecayDataBase = evolutivedb;
48 
49  cout << "!!INFO!! !!!Storage!!! A new Storage has been define." << endl;
50 
51  fLog->fLog << "!!INFO!! !!!Storage!!! A new Storage has been define." << endl;
52 
53 
54 }
Storage::~Storage ( )

Définition à la ligne 57 du fichier Storage.cxx.

58 {
59 
60 
61 }

Documentation des fonctions membres

void Storage::AddToFullStock ( ZAI  zai,
double  quantity 
)
inline

Add a ZAI*quantity to the Storage.

Définition à la ligne 70 du fichier Storage.hxx.

void Storage::AddToFullStock ( IsotopicVector  isotopicvector)
inline

Add a IsotopicVector to the Storage.

Définition à la ligne 71 du fichier Storage.hxx.

void Storage::AddToStock ( ZAI  zai,
double  quantity 
)
inline

Add a ZAI*quantity to the Storage.

Définition à la ligne 68 du fichier Storage.hxx.

void Storage::AddToStock ( IsotopicVector  isotopicvector)

Add an Isotopicvector to the Storage.

Définition à la ligne 98 du fichier Storage.cxx.

99 {
100 
101  if(fParc->GetStockManagement() == true)
102  fIVStock.push_back(isotopicvector);
103  AddToFullStock(isotopicvector);
104 
105 }
Storage::ClassDef ( Storage  ,
 
)
protected
void Storage::ClearStock ( )

Définition à la ligne 88 du fichier Storage.cxx.

89 {
90 
91  IsotopicVector EmptyIV;
92  fIVFullStock = EmptyIV;
93  fIVStock.clear();
94 
95 }
void Storage::Evolution ( cSecond  t)

Performe the evolution until the Time t.

Définition à la ligne 182 du fichier Storage.cxx.

183 {
184 
185  // Check if the Storage has been created ...
186  if(t == fInternalTime && t!=0) return;
187  // Make the evolution for the Storage ...
188  StorageEvolution(t);
189  // ... And Finaly update the AbsoluteInternalTime
190  fInternalTime = t;
191 
192 
193 
194 }
DataBank<ZAI>* Storage::GeDecayDataBase ( ) const
inline

Return the pointer to the Decay DataBase.

Définition à la ligne 57 du fichier Storage.hxx.

IsotopicVector Storage::GetDecay ( IsotopicVector  isotopicvector,
cSecond  t 
)
protected

Get IsotopicVector Decay at the t time.

Définition à la ligne 67 du fichier Storage.cxx.

68 {
69 
70  IsotopicVector IV;
71 
72  map<ZAI ,double> isotopicquantity = isotopicvector.GetIsotopicQuantity();
73  map<ZAI ,double >::iterator it;
74  for( it = isotopicquantity.begin(); it != isotopicquantity.end(); it++)
75  {
76  if((*it).second > 0)
77  {
78  IsotopicVector ivtmp = fDecayDataBase->Evolution(it->first, t) * (*it).second ;
79  IV += ivtmp;
80  }
81  }
82 
83  return IV;
84 
85 }
IsotopicVector Storage::GetFullStock ( ) const
inline

Return the Full Storage.

Définition à la ligne 59 du fichier Storage.hxx.

int Storage::GetId ( ) const
inline

Return the Storage Parc'Is.

Définition à la ligne 52 du fichier Storage.hxx.

double Storage::GetInternalTime ( ) const
inline

Return Creation Time.

Définition à la ligne 56 du fichier Storage.hxx.

LogFile* Storage::GetLog ( ) const
inline

Return the Pointer to the Log.

Définition à la ligne 53 du fichier Storage.hxx.

CLASS* Storage::GetParc ( ) const
inline

return the Pointer to the Parc

Définition à la ligne 54 du fichier Storage.hxx.

vector<IsotopicVector> Storage::GetStock ( ) const
inline

Return the Storage IsotopicVector.

Définition à la ligne 58 du fichier Storage.hxx.

void Storage::SetDecayDataBase ( DataBank< ZAI > *  ddb)
inline

Set the pointer to the Decay DataBase.

Définition à la ligne 48 du fichier Storage.hxx.

void Storage::SetId ( int  id)
inline

Set The Storage Parc'Id.

Définition à la ligne 44 du fichier Storage.hxx.

void Storage::SetLog ( LogFile Log)
inline

Set the Pointer to the Log.

Définition à la ligne 46 du fichier Storage.hxx.

void Storage::SetParc ( CLASS parc)
inline

Set the Pointer to the Parc.

Définition à la ligne 45 du fichier Storage.hxx.

void Storage::SetStock ( vector< IsotopicVector IVsstock)
inline

Set The Storage isotopicVector.

Définition à la ligne 49 du fichier Storage.hxx.

void Storage::StorageEvolution ( cSecond  t)
protected

Deal the Storage Decay Evolution.

Définition à la ligne 154 du fichier Storage.cxx.

155 {
156 
157 
158  if(t == fInternalTime && t !=0 ) return;
159 
160  for(int i = (int)fIVStock.size()-1 ; i >=0; i--)
161  if(Norme(fIVStock[i]) == 0)
162  fIVStock.erase(fIVStock.begin()+i);
163 
164 
165 
166  int EvolutionTime = t - fInternalTime;
167 
168  fIVFullStock = GetDecay(fIVFullStock , EvolutionTime);
169 
170 #pragma omp parallel for
171  for (int i=0; i <(int) fIVStock.size() ; i++)
172  {
173  fIVStock[i] = GetDecay(fIVStock[i] , EvolutionTime);
174  }
175 
176 
177 
178 
179 }
void Storage::TakeFractionFromStock ( int  IVId,
double  fraction 
)

Take a part from an IV in sotck;.

Définition à la ligne 108 du fichier Storage.cxx.

109 {
110 
111  if(fParc->GetStockManagement() == true)
112  {
113  if(fraction > 1 || fraction < 0)
114  {
115  cout << fraction << endl;
116  cout << "!!Warning!! !!!Storage!!! You try to remove fraction superior than 1 or a negative one..." << endl;
117  fLog->fLog << "!!Warning!! !!!Storage!!! You try to remove fraction superior than 1 or a negative one..." << endl;
118  }
119  else
120  {
121  fIVFullStock -= fIVStock[IVId]*fraction;
122  fIVStock[IVId] = fIVStock[IVId]*(1-fraction);
123 
124  }
125 
126  }
127  else
128  {
129  cout << "!!Warning!! !!!Storage!!! TakeFractionFromStock can't be DEFINE without REAL stock management" << endl;
130  fLog->fLog << "!!Warning!! !!!Storage!!! TakeFractionFromStock can't be DEFINE without REAL stock management" << endl;
131  exit(1);
132 
133  }
134 
135 
136 
137 }
void Storage::TakeFromStock ( IsotopicVector  isotopicvector)

Définition à la ligne 139 du fichier Storage.cxx.

140 {
141 
142  if(fParc->GetStockManagement() == false)
143  fIVFullStock -= isotopicvector;
144  else
145  {
146  cout << "!!Warning!! !!!Storage!!! TakeFromStock can't be DEFINE WITH REAL stock management" << endl;
147  fLog->fLog << "!!Warning!! !!!Storage!!! TakeFromStock can't be DEFINE WITH REAL stock management" << endl;
148  exit(1);
149  }
150 
151 }
void Storage::Write ( string  filename,
cSecond  date = -1 
)

Définition à la ligne 196 du fichier Storage.cxx.

197 {
198 
199  for(int i=0;i < (int)fIVStock.size(); i++)
200  {
201 
202  fIVStock[i].Write(filename, date);
203  }
204 
205 }

Documentation des données membres

DataBank<ZAI>* Storage::fDecayDataBase
protected

Pointer to the Decay DataBase.

Définition à la ligne 89 du fichier Storage.hxx.

int Storage::fId
protected

Identity of the Reactor inside the Parc.

Définition à la ligne 82 du fichier Storage.hxx.

cSecond Storage::fInternalTime
protected

Internal Clock.

Définition à la ligne 83 du fichier Storage.hxx.

IsotopicVector Storage::fIVFullStock
protected

Full Storage conglomerat.

Définition à la ligne 97 du fichier Storage.hxx.

vector<IsotopicVector> Storage::fIVStock
protected

Définition à la ligne 96 du fichier Storage.hxx.

LogFile* Storage::fLog
protected

Pointer to the Log.

Définition à la ligne 87 du fichier Storage.hxx.

CLASS* Storage::fParc
protected

Pointer to the Parc.

Définition à la ligne 86 du fichier Storage.hxx.


La documentation de cette classe a été générée à partir des fichiers suivants :