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

#include "IsotopicVector.hxx"

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

Fonctions membres publiques

 IsotopicVector ()
 < Normal Constructor. Plus de détails...
 
 ~IsotopicVector ()
 
map< ZAI,double > GetIsotopicQuantity () const
 Return the IVQuantity map. Plus de détails...
 
map< ZAI,double > GetIsotopicQuantityNeeded () const
 Return the IVQuantityNeeded map. Plus de détails...
 
IsotopicVector GetSpeciesComposition (int z) const
 Return the Species composition of the "z" atom. Plus de détails...
 
IsotopicVector GetActinidesComposition () const
 Return the Actinides composition of the "z" atom. Plus de détails...
 
double GetZAIIsotopicQuantity (const ZAI &zai) const
 Return the composition of the IsotopicVector. Plus de détails...
 
double GetZAIIsotopicQuantity (const int z, const int a, const int i) const
 Return the composition of the IsotopicVector. Plus de détails...
 
vector< int > GetChemicalSpecies () const
 Return the Species Species contained. Plus de détails...
 
void Clear ()
 Empty all the IV. Plus de détails...
 
void ClearNeed ()
 Empty Need componant of the IV. Plus de détails...
 
void Add (const ZAI &zai, double quantity)
 Add Quantity gramme of the ZAI Element. Plus de détails...
 
void Add (const IsotopicVector &isotopicvector)
 Add IsotopicVector to the existing IsotopicVector. Plus de détails...
 
void Add (const map< ZAI, double > &quantity)
 Add IsotopicVector to the existing IsotopicVector. Plus de détails...
 
void Need (const ZAI &zai, double quantity)
 Fill the fIsotopicQuantityNeeded. Plus de détails...
 
void Need (const IsotopicVector &isotopicvector)
 Fill the fIsotopicQuantityNeeded. Plus de détails...
 
void Need (const map< ZAI, double > &quantityneeded)
 Fill the fIsotopicQuantityNeeded. Plus de détails...
 
void Remove (const ZAI &zai, double quantity)
 Remove Quantity gramme of the ZAI Element. Plus de détails...
 
void Remove (const IsotopicVector &isotopicvector)
 Remove IsotopicVector to the existing IsotopicVector. Plus de détails...
 
void Multiply (double factor)
 Multiply the IV by a Factor. Plus de détails...
 
void Write (string filename, cSecond time=-1) const
 Write the Content of the IV in the filename file. Plus de détails...
 
void Print (string o=" ") const
 Print the composition of the IV. Plus de détails...
 
IsotopicVectoroperator+= (IsotopicVector const &IVb)
 .... Plus de détails...
 
IsotopicVectoroperator-= (IsotopicVector const &IVb)
 .... Plus de détails...
 
bool operator< (const IsotopicVector &isotopicvector) const
 IsotopicVector Comparator. Plus de détails...
 

Fonctions membres protégées

 ClassDef (IsotopicVector, 2)
 

Attributs protégés

map< ZAI,double > fIsotopicQuantity
 Isotopic vector composition in Atome Number. Plus de détails...
 
map< ZAI,double > fIsotopicQuantityNeeded
 Isotopic vector request and not present. Plus de détails...
 

Description détaillée

Définition à la ligne 28 du fichier IsotopicVector.hxx.

Documentation des constructeurs et destructeur

IsotopicVector::IsotopicVector ( )

< Normal Constructor.

Normal Destructor.

Définition à la ligne 241 du fichier IsotopicVector.cxx.

242 {
243 
244 
245 }
IsotopicVector::~IsotopicVector ( )

Définition à la ligne 249 du fichier IsotopicVector.cxx.

250 {
251 
252 }

Documentation des fonctions membres

void IsotopicVector::Add ( const ZAI zai,
double  quantity 
)

Add Quantity gramme of the ZAI Element.

Définition à la ligne 286 du fichier IsotopicVector.cxx.

287 {
288 
289  if( ceil(quantity*1e25) - quantity*1e25 > quantity*1e25 - floor(quantity*1e25) )
290  quantity = floor(quantity*1e25)*1/1e25;
291  else quantity = ceil(quantity*1e25)*1/1e25;
292 
293 
294  if(quantity > 0)
295  {
296  pair<map<ZAI, double>::iterator, bool> IResult;
297  IResult = fIsotopicQuantity.insert( pair<ZAI ,double>(zai, quantity));
298  if(IResult.second == false)
299  IResult.first->second += quantity;
300  }
301 
302 
303 }
void IsotopicVector::Add ( const IsotopicVector isotopicvector)

Add IsotopicVector to the existing IsotopicVector.

Définition à la ligne 306 du fichier IsotopicVector.cxx.

307 {
308 
309  map<ZAI ,double> isotopicquantity = isotopicvector.GetIsotopicQuantity();
310  map<ZAI ,double >::iterator it;
311  for( it = isotopicquantity.begin(); it != isotopicquantity.end(); it++)
312  Add( (*it).first, (*it).second);
313 
314 
315 }
void IsotopicVector::Add ( const map< ZAI, double > &  quantity)

Add IsotopicVector to the existing IsotopicVector.

Définition à la ligne 318 du fichier IsotopicVector.cxx.

319 {
320 
321  map<ZAI ,double> isotopicquantity = quantity;
322  map<ZAI ,double >::iterator it;
323  for( it = isotopicquantity.begin(); it != isotopicquantity.end(); it++)
324  Add( (*it).first, (*it).second);
325 
326 
327 }
IsotopicVector::ClassDef ( IsotopicVector  ,
 
)
protected
void IsotopicVector::Clear ( )

Empty all the IV.

Définition à la ligne 259 du fichier IsotopicVector.cxx.

260 {
261 
262  fIsotopicQuantityNeeded.clear();
263  fIsotopicQuantity.clear();
264 
265 }
void IsotopicVector::ClearNeed ( )

Empty Need componant of the IV.

Définition à la ligne 267 du fichier IsotopicVector.cxx.

268 {
269 
270  fIsotopicQuantityNeeded.clear();
271 
272 }
IsotopicVector IsotopicVector::GetActinidesComposition ( ) const

Return the Actinides composition of the "z" atom.

Définition à la ligne 450 du fichier IsotopicVector.cxx.

451 {
452 
453  IsotopicVector IV;
454  for (int i = 0; i <12; i++)
455  IV += GetSpeciesComposition(89+i);
456  return IV;
457 
458 }
vector< int > IsotopicVector::GetChemicalSpecies ( ) const

Return the Species Species contained.

Définition à la ligne 460 du fichier IsotopicVector.cxx.

461 {
462 
463  vector<int> ChemicalSpecies;
464 
465  map<ZAI ,double > IsotopicQuantity = GetIsotopicQuantity();
466  map<ZAI ,double >::iterator it;
467  for( it = IsotopicQuantity.begin(); it != IsotopicQuantity.end(); it++)
468  if( (int)ChemicalSpecies.size() ==0 || (*it).first.Z() != ChemicalSpecies.back() )
469  ChemicalSpecies.push_back((*it).first.Z());
470 
471 
472  return ChemicalSpecies;
473 }
map<ZAI ,double> IsotopicVector::GetIsotopicQuantity ( ) const
inline

Return the IVQuantity map.

Définition à la ligne 42 du fichier IsotopicVector.hxx.

map<ZAI ,double> IsotopicVector::GetIsotopicQuantityNeeded ( ) const
inline

Return the IVQuantityNeeded map.

Définition à la ligne 43 du fichier IsotopicVector.hxx.

IsotopicVector IsotopicVector::GetSpeciesComposition ( int  z) const

Return the Species composition of the "z" atom.

Définition à la ligne 435 du fichier IsotopicVector.cxx.

436 {
437 
438  IsotopicVector IV;
439  map<ZAI ,double > IsotopicQuantity = GetIsotopicQuantity();
440  map<ZAI ,double >::iterator it;
441  for( it = IsotopicQuantity.begin(); it != IsotopicQuantity.end(); it++)
442 
443  if( (*it).first.Z() == z )
444  IV += (*it).first * (*it).second;
445 
446  return IV;
447 
448 }
double IsotopicVector::GetZAIIsotopicQuantity ( const ZAI zai) const

Return the composition of the IsotopicVector.

Définition à la ligne 408 du fichier IsotopicVector.cxx.

409 {
410 
411  map<ZAI ,double> IsotopicQuantity = fIsotopicQuantity;
412 
413  map<ZAI ,double>::iterator it;
414  it = IsotopicQuantity.find(zai);
415 
416 
417  if ( it != IsotopicQuantity.end() )
418  {
419  return it->second;
420  }
421  else
422  {
423  return 0;
424  }
425 }
double IsotopicVector::GetZAIIsotopicQuantity ( const int  z,
const int  a,
const int  i 
) const

Return the composition of the IsotopicVector.

Définition à la ligne 428 du fichier IsotopicVector.cxx.

429 {
430 
431  ZAI zai(z, a, i);
432  return GetZAIIsotopicQuantity(zai);
433 }
void IsotopicVector::Multiply ( double  factor)

Multiply the IV by a Factor.

Définition à la ligne 275 du fichier IsotopicVector.cxx.

276 {
277 
278  map<ZAI ,double >::iterator it;
279  for( it = fIsotopicQuantity.begin(); it != fIsotopicQuantity.end(); it++)
280  (*it).second = (*it).second * factor;
281 
282 
283 }
void IsotopicVector::Need ( const ZAI zai,
double  quantity 
)

Fill the fIsotopicQuantityNeeded.

Définition à la ligne 375 du fichier IsotopicVector.cxx.

376 {
377 
378  if( ceil(quantity*1e25) - quantity*1e25 > quantity*1e25 - floor(quantity*1e25) )
379  quantity = floor(quantity*1e25)*1/1e25;
380  else quantity = ceil(quantity*1e25)*1/1e25;
381 
382 
383  pair<map<ZAI, double>::iterator, bool> IResult;
384  if(quantity > 0)
385  {
386  IResult = fIsotopicQuantityNeeded.insert( pair<ZAI ,double>(zai, quantity));
387  if(IResult.second == false)
388  IResult.first->second += quantity;
389  }
390 
391 
392 
393 }
void IsotopicVector::Need ( const IsotopicVector isotopicvector)

Fill the fIsotopicQuantityNeeded.

Définition à la ligne 396 du fichier IsotopicVector.cxx.

397 {
398 
399  map<ZAI ,double> isotopicquantity = isotopicvector.GetIsotopicQuantity();
400  map<ZAI ,double >::iterator it;
401  for( it = isotopicquantity.begin(); it != isotopicquantity.end(); it++)
402  Need( (*it).first, (*it).second);
403 
404 }
void IsotopicVector::Need ( const map< ZAI, double > &  quantityneeded)
inline

Fill the fIsotopicQuantityNeeded.

Définition à la ligne 62 du fichier IsotopicVector.hxx.

IsotopicVector & IsotopicVector::operator+= ( IsotopicVector const &  IVb)

....

Définition à la ligne 197 du fichier IsotopicVector.cxx.

198 {
199 
200  Add(IVa);
201  return *this;
202 
203 }
IsotopicVector & IsotopicVector::operator-= ( IsotopicVector const &  IVb)

....

Définition à la ligne 206 du fichier IsotopicVector.cxx.

207 {
208 
209  Remove(IVa);
210  return *this;
211 
212 }
bool IsotopicVector::operator< ( const IsotopicVector isotopicvector) const

IsotopicVector Comparator.

Définition à la ligne 214 du fichier IsotopicVector.cxx.

215 {
216 
217  if( Norme(*this) != Norme(isotopicvector) )
218  return Norme(*this) < Norme(isotopicvector);
219  else if( (*this).GetIsotopicQuantity().size() != isotopicvector.GetIsotopicQuantity().size() )
220  return (*this).GetIsotopicQuantity().size() < isotopicvector.GetIsotopicQuantity().size();
221  else
222  {
223  map<ZAI ,double>::iterator it;
224  map<ZAI ,double>::iterator it2 = isotopicvector.GetIsotopicQuantity().begin();
225  map<ZAI ,double> IsotopicQuantity = (*this).GetIsotopicQuantity();
226  for( it = IsotopicQuantity.begin(); it != IsotopicQuantity.end(); it++ )
227  {
228  if( (*it).first != (*it2).first )
229  return (*it).first < (*it2).first;
230  else it2++;
231  }
232  return false;
233  }
234 
235 }
void IsotopicVector::Print ( string  o = " ") const

Print the composition of the IV.

Définition à la ligne 498 du fichier IsotopicVector.cxx.

499 {
500 
501  cout << "**************************" << endl;
502  cout << "*Isotopic Vector Property*" << endl;
503  cout << "**************************" << endl << endl;
504 
505  bool QuantityPrint = false;
506  bool DBPrint = false;
507 
508  QuantityPrint = true;
509 
510  if(QuantityPrint)
511  {
512  cout << "*Isotopic Vector Quantity*" << endl;
513  map<ZAI ,double> IsotopicQuantity = GetIsotopicQuantity();
514  map<ZAI ,double >::iterator it;
515  for(it = IsotopicQuantity.begin();it != IsotopicQuantity.end(); it++)
516  {
517  cout << (*it).first.Z() << " ";
518  cout << (*it).first.A() << " ";
519  cout << (*it).first.I() << " ";
520  cout << ": " << (*it).second;
521  cout << endl;
522  }
523  cout << endl;
524  cout << "*Isotopic Vector Quantity Needed*" << endl;
525  map<ZAI ,double> IsotopicQuantityNeeded = GetIsotopicQuantityNeeded();
526  for(it = IsotopicQuantityNeeded.begin(); it != IsotopicQuantityNeeded.end(); it++)
527  {
528  cout << (*it).first.Z() << " ";
529  cout << (*it).first.A() << " ";
530  cout << (*it).first.I() << " ";
531  cout << ": " << (*it).second;
532  cout << endl;
533  }
534  cout << endl;
535  }
536  if(DBPrint)
537  {
538  cout << "****Isotopic Vector DB****" << endl;
539  }
540 
541 }
void IsotopicVector::Remove ( const ZAI zai,
double  quantity 
)

Remove Quantity gramme of the ZAI Element.

Définition à la ligne 331 du fichier IsotopicVector.cxx.

332 {
333 
334 
335  map<ZAI ,double>::iterator it;
336  it = fIsotopicQuantity.find(zai);
337 
338  if( ceil(quantity*1e25) - quantity*1e25 > quantity*1e25 - floor(quantity*1e25) )
339  quantity = floor(quantity*1e25)*1/1e25;
340  else quantity = ceil(quantity*1e25)*1/1e25;
341 
342  if(quantity > 0)
343  {
344  if ( it != fIsotopicQuantity.end() )
345  {
346  if (it->second > quantity)
347  it->second = it->second - quantity;
348  else
349  {
350  Need(zai, quantity - it->second );
351  it->second = 0;
352  }
353  }
354  else
355  {
356  Need(zai, quantity);
357  }
358  }
359 
360 
361 }
void IsotopicVector::Remove ( const IsotopicVector isotopicvector)

Remove IsotopicVector to the existing IsotopicVector.

Définition à la ligne 364 du fichier IsotopicVector.cxx.

365 {
366 
367  map<ZAI ,double> isotopicquantity = isotopicvector.GetIsotopicQuantity();
368  map<ZAI ,double >::iterator it;
369  for( it = isotopicquantity.begin(); it != isotopicquantity.end(); it++)
370  Remove( (*it).first, (*it).second);
371 
372 }
void IsotopicVector::Write ( string  filename,
cSecond  time = -1 
) const

Write the Content of the IV in the filename file.

Définition à la ligne 477 du fichier IsotopicVector.cxx.

478 {
479  ofstream IVfile(filename.c_str(), ios_base::app); // Open the File
480  if(!IVfile)
481  cout << "!!Warning!! !!!IsotopicVector!!! \n Can't open \"" << filename << "\"\n" << endl;
482 
483  if(time != -1)
484  IVfile << "Time "<< time/365.25/3600./24. << endl;
485 
486  map<ZAI ,double> IsotopicQuantity = GetIsotopicQuantity();
487  map<ZAI ,double >::iterator it;
488  for(it = IsotopicQuantity.begin(); it != IsotopicQuantity.end(); it++)
489  {
490  IVfile << (*it).first.Z() << " ";
491  IVfile << (*it).first.A() << " ";
492  IVfile << (*it).first.I() << " ";
493  IVfile << (*it).second << " " << endl;
494  }
495  IVfile << endl;
496 }

Documentation des données membres

map<ZAI ,double> IsotopicVector::fIsotopicQuantity
protected

Isotopic vector composition in Atome Number.

Définition à la ligne 88 du fichier IsotopicVector.hxx.

map<ZAI ,double> IsotopicVector::fIsotopicQuantityNeeded
protected

Isotopic vector request and not present.

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


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