From c73811bdfaabeed3cfd033446ea02d4642291d1c Mon Sep 17 00:00:00 2001 From: Baptiste Mouginot <mouginot.baptiste@gmail.com> Date: Fri, 7 Jun 2013 08:16:01 +0000 Subject: [PATCH] Removing DBLG... & Define.hxx git-svn-id: svn+ssh://svn.in2p3.fr/class@104 0e7d625b-0364-4367-a6be-d5be4a48d228 --- source/trunk/src/CLASS.cxx | 80 +++++++++--------- source/trunk/src/DataBank.cxx | 60 +++++++------- source/trunk/src/EvolutionData.cxx | 102 +++++++++++------------ source/trunk/src/FabricationPlant.cxx | 72 ++++++++-------- source/trunk/src/IsotopicVector.cxx | 115 ++++++++++++-------------- source/trunk/src/LogFile.cxx | 8 +- source/trunk/src/Pool.cxx | 45 +++++----- source/trunk/src/Reactor.cxx | 48 +++++------ source/trunk/src/Storage.cxx | 50 +++++------ source/trunk/src/ZAI.cxx | 12 +-- 10 files changed, 293 insertions(+), 299 deletions(-) diff --git a/source/trunk/src/CLASS.cxx b/source/trunk/src/CLASS.cxx index 401d28a5e..7af0f7314 100755 --- a/source/trunk/src/CLASS.cxx +++ b/source/trunk/src/CLASS.cxx @@ -47,7 +47,7 @@ string dtoa(double num) //________________________________________________________________________ CLASS::CLASS() { - DBGL; + fNewTtree = true; fPrintStep = (cSecond)(3600*24*365.25); // One Step per Year @@ -80,13 +80,13 @@ CLASS::CLASS() fLog->fLog << "\t Log will be in " << fOutputLogName << endl << endl; - DBGL; + } //________________________________________________________________________ CLASS::CLASS(double abstime) { - DBGL; + fNewTtree = true; fPrintStep = (cSecond)(3600*24*365.25); // One Step per Year fAbsoluteTime = (cSecond)abstime; @@ -119,23 +119,23 @@ CLASS::CLASS(double abstime) fLog->fLog << "\t Log will be in " << fOutputLogName << endl << endl; - DBGL; + } //________________________________________________________________________ CLASS::~CLASS() { - DBGL; + #pragma omp single {CloseOutputTree();} - DBGL; + } //________________________________________________________________________ void CLASS::AddPool(Pool* Pool) { - DBGL; + fPool.push_back(Pool); fPool.back()->SetParc(this); @@ -151,13 +151,13 @@ void CLASS::AddPool(Pool* Pool) Pool_name += "."; fOutT->Branch(Pool_name.c_str(), "Pool", &fPool.back()); } - DBGL; + } //________________________________________________________________________ void CLASS::AddReactor(Reactor* reactor) { - DBGL; + fReactor.push_back(reactor); fReactor.back()->SetParc(this); fReactor.back()->SetLog(fLog); @@ -175,13 +175,13 @@ void CLASS::AddReactor(Reactor* reactor) fOutT->Branch(Reactor_name.c_str(), "Reactor", &fReactor.back()); } - DBGL; + } //________________________________________________________________________ void CLASS::AddStorage(Storage* storage) { - DBGL; + fStorage.push_back(storage); fStorage.back()->SetParc(this); fStorage.back()->SetDecayDataBase( (*this).GetDecayDataBase() ); @@ -196,12 +196,12 @@ void CLASS::AddStorage(Storage* storage) fOutT->Branch(Storage_name.c_str(), "Storage", &fStorage.back()); } - DBGL; + } //________________________________________________________________________ void CLASS::AddFabricationPlant(FabricationPlant* fabricationplant) { - DBGL; + fFabricationPlant.push_back(fabricationplant); fFabricationPlant.back()->SetParc(this); fFabricationPlant.back()->SetDecayDataBase( (*this).GetDecayDataBase() ); @@ -216,13 +216,13 @@ void CLASS::AddFabricationPlant(FabricationPlant* fabricationplant) fOutT->Branch(FabricationPlant_name.c_str(), "FabricationPlant", &fFabricationPlant.back()); } - DBGL; + } //________________________________________________________________________ void CLASS::BuildTimeVector(cSecond t) { - DBGL; + fTimeStep.clear(); fTimeStep.insert( pair<double ,int>(t,1) ); @@ -366,7 +366,7 @@ void CLASS::BuildTimeVector(cSecond t) for( it = fTimeStep.begin(); it != fTimeStep.end(); it++) TimeStepfile << (double)((*it).first/3600/24./365.25) << " " << (*it).second << endl; - DBGL; + } @@ -377,37 +377,37 @@ void CLASS::BuildTimeVector(cSecond t) void CLASS::PoolEvolution() { - DBGL; + for(int i = 0; i < (int) fPool.size();i++) fPool[i]->Evolution(fAbsoluteTime); for(int i = 0; i < (int) fPool.size();i++) fPool[i]->Dump(); - DBGL; + } void CLASS::StorageEvolution() { - DBGL; + for(int i = 0; i < (int) fStorage.size();i++) fStorage[i]->Evolution(fAbsoluteTime); - DBGL; + } void CLASS::FabricationPlantEvolution() { - DBGL; + for(int i = 0; i < (int) fFabricationPlant.size();i++) fFabricationPlant[i]->Evolution(fAbsoluteTime); - DBGL; + } //________________________________________________________________________ void CLASS::ReactorEvolution() { - DBGL; + fParcPower = 0; #pragma omp parallel for for(int i = 0; i < (int)fReactor.size(); i++) @@ -417,13 +417,13 @@ void CLASS::ReactorEvolution() for(int i = 0; i < (int)fReactor.size(); i++) fReactor[i]->Dump(); - DBGL; + } //________________________________________________________________________ void CLASS::Evolution(double t) { - DBGL; + BuildTimeVector( (cSecond)t ); @@ -504,12 +504,12 @@ void CLASS::Evolution(double t) } cout << endl; - DBGL; + } void CLASS::ProgressPrintout(cSecond t) { - DBGL; + double Time = (fAbsoluteTime-fStartingTime)/3600/24/365.25 ; double Total = (t-fStartingTime)/3600/24/365.25; @@ -525,7 +525,7 @@ void CLASS::ProgressPrintout(cSecond t) if (Time < 10) cout << " "; if (Time < 100) cout << " "; cout << (int)Time << " / " << (int)Total << " Years \r" << flush; - DBGL; + } //________________________________________________________________________ @@ -533,7 +533,7 @@ void CLASS::ProgressPrintout(cSecond t) //________________________________________________________________________ void CLASS::UpdateParc() { - DBGL; + ResetQuantity(); for (int i =0; i < (int)fFabricationPlant.size(); i++) @@ -551,14 +551,14 @@ void CLASS::UpdateParc() fIVTotal = fWaste + fTotalStorage + fTotalCooling + fFuelFabrication + fTotalInReactor; fIVInCycleTotal = fTotalStorage + fTotalCooling + fFuelFabrication + fTotalInReactor; - DBGL; + } void CLASS::ResetQuantity() { - DBGL; + fTotalInReactor.Clear(); fTotalStorage.Clear(); @@ -566,13 +566,13 @@ void CLASS::ResetQuantity() fFuelFabrication.Clear(); fIVInCycleTotal.Clear(); fIVTotal.Clear(); - DBGL; + } //________________________________________________________________________ void CLASS::OpenOutputTree() { - DBGL; + cout << "Opening OutPut File ...\t"; fLog->fLog << "Opening : " << fOutputFileName << " ...\t"; @@ -603,7 +603,7 @@ void CLASS::OpenOutputTree() } void CLASS::CloseOutputTree() { - DBGL; + fOutFile->ls(); cout << "Writing outTree " << fOutputFileName << endl; @@ -627,7 +627,7 @@ void CLASS::CloseOutputTree() //________________________________________________________________________ void CLASS::OutAttach() { - DBGL; + ResetQuantity(); //Branch Absolut Time fOutT->Branch("AbsTime",&fAbsoluteTime,"AbsoluteTime/l"); @@ -682,22 +682,22 @@ void CLASS::OutAttach() FP_name += "."; fOutT->Branch(FP_name.c_str(), "FabricationPlant", &fFabricationPlant[i]); } - DBGL; + } //________________________________________________________________________ void CLASS::Write() { - DBGL; - DBGL; + + } //________________________________________________________________________ void CLASS::Print() { - DBGL; + for(int i = 0; i < (int) fPool.size();i++) { cout << "!!!!!!!!!STEP : " << fAbsoluteTime/(int)(3600*24*365.25) << endl; @@ -711,5 +711,5 @@ void CLASS::Print() cout << "Reactor" << endl; fReactor[i]->GetIVReactor().Print(); } - DBGL; + } diff --git a/source/trunk/src/DataBank.cxx b/source/trunk/src/DataBank.cxx index 581a48af8..01f29e578 100755 --- a/source/trunk/src/DataBank.cxx +++ b/source/trunk/src/DataBank.cxx @@ -23,7 +23,7 @@ using namespace std; double ReactionRateWeightedDistance(IsotopicVector IV1, EvolutionData DB ) { - DBGL; + double d2 = 0; double XS_total = 0; IsotopicVector IV2 = DB.GetIsotopicVectorAt(0.).GetActinidesComposition(); @@ -44,7 +44,7 @@ double ReactionRateWeightedDistance(IsotopicVector IV1, EvolutionData DB ) XS_total += (Z1+Z2)*XS/2; } - DBGL; + return sqrt(d2)/XS_total; } @@ -71,20 +71,20 @@ void DataBank<IsotopicVector>::ReadDataBase(); template<> DataBank<ZAI>::DataBank() { - DBGL; + // Warning cout << "!!INFO!! !!!DataBank<ZAI>!!! A EvolutionData<ZAI> has been define." << endl << endl; - DBGL; + } template<> DataBank<ZAI>::DataBank(LogFile* Log, string DB_index_file, bool olfreadmethod) { - DBGL; + fLog = Log; fDataBaseIndex = DB_index_file; @@ -97,21 +97,21 @@ DataBank<ZAI>::DataBank(LogFile* Log, string DB_index_file, bool olfreadmethod) fLog->fLog << "!!INFO!! !!!DataBank<ZAI>!!! A EvolutionData<ZAI> has been define :" << endl; fLog->fLog << "\t His index is : \"" << DB_index_file << "\"" << endl << endl; - DBGL; + } //________________________________________________________________________ template<> DataBank<ZAI>::~DataBank() { - DBGL; - DBGL; + + } template<> IsotopicVector DataBank<ZAI>::Evolution(const ZAI& zai, double dt) { - DBGL; + IsotopicVector returnIV; map<ZAI ,EvolutionData >::iterator it = fDataBank.find(zai); @@ -174,7 +174,7 @@ IsotopicVector DataBank<ZAI>::Evolution(const ZAI& zai, double dt) template<> bool DataBank<ZAI>::IsDefine(const ZAI& zai) const { - DBGL; + map<ZAI ,EvolutionData > evolutiondb = (*this).GetDataBank(); if (evolutiondb.find(zai) != evolutiondb.end()) return true; @@ -212,14 +212,14 @@ bool DataBank<ZAI>::IsDefine(const ZAI& zai) const template<> DataBank<IsotopicVector>::~DataBank() { - DBGL; - DBGL; + + } template<> DataBank<IsotopicVector>::DataBank() { - DBGL; + // Warning cout << "!!INFO!! !!!DataBank<IsotopicVector>!!! A EvolutionData<ZAI> has been define :" << endl << endl; @@ -229,14 +229,14 @@ DataBank<IsotopicVector>::DataBank() - DBGL; + } template<> DataBank<IsotopicVector>::DataBank(LogFile* Log, string DB_index_file, bool olfreadmethod) { - DBGL; + fLog = Log; fDataBaseIndex = DB_index_file; fUpdateReferenceDBatEachStep = false; @@ -254,13 +254,13 @@ DataBank<IsotopicVector>::DataBank(LogFile* Log, string DB_index_file, bool olfr fLog->fLog << "\t His index is : \"" << DB_index_file << "\"" << endl; fLog->fLog << "\t " << fDataBank.size() << " EvolutionData have been read."<< endl << endl; - DBGL; + } template<> void DataBank<IsotopicVector>::ReadDataBase() { - DBGL; + ifstream DataDB(fDataBaseIndex.c_str()); // Open the File if(!DataDB) { @@ -308,7 +308,7 @@ void DataBank<IsotopicVector>::ReadDataBase() fDataBank.insert( pair<IsotopicVector, EvolutionData >(ivtmp , (*evolutionproduct) )); } } - DBGL; + } //________________________________________________________________________ @@ -317,7 +317,7 @@ void DataBank<IsotopicVector>::ReadDataBase() template<> map<double, EvolutionData> DataBank<IsotopicVector>::GetDistancesTo(IsotopicVector isotopicvector, double t) const { - DBGL; + map<double, EvolutionData> distances; map<IsotopicVector, EvolutionData > evolutiondb = fDataBank; @@ -334,13 +334,13 @@ map<double, EvolutionData> DataBank<IsotopicVector>::GetDistancesTo(IsotopicVect } return distances; - DBGL; + } template<> EvolutionData DataBank<IsotopicVector>::GetClosest(IsotopicVector isotopicvector, double t) const { - DBGL; + map<IsotopicVector, EvolutionData > evolutiondb = fDataBank; double distance = Distance(isotopicvector.GetActinidesComposition(), @@ -368,13 +368,13 @@ EvolutionData DataBank<IsotopicVector>::GetClosest(IsotopicVector isotopicvector } return CloseEvolData; - DBGL; + } template<> EvolutionData DataBank<IsotopicVector>::GenerateEvolutionData(IsotopicVector isotopicvector, double cycletime, double Power) { - DBGL; + string ReactorType; double ReactorMass = 0; map<ZAI, pair<double, map< ZAI, double > > > ZAIDecay; @@ -998,7 +998,7 @@ EvolutionData DataBank<IsotopicVector>::GenerateEvolutionData(IsotopicVector iso return GeneratedDB; - DBGL; + } @@ -1008,7 +1008,7 @@ EvolutionData DataBank<IsotopicVector>::GenerateEvolutionData(IsotopicVector iso template<> void DataBank<IsotopicVector>::CalculateDistanceParameter() { - DBGL; + if(fDistanceType!=1){ cout << "!!Warning!! !!!CalculateDistanceParameter!!!" << " Distance Parameter will be calculate even if the distance type is not the good one. Any Distance Parameters given by the user will be overwriten"<<endl; @@ -1055,13 +1055,13 @@ void DataBank<IsotopicVector>::CalculateDistanceParameter() fLog->fLog << endl; - DBGL; + } //________________________________________________________________________ template<> void DataBank<IsotopicVector>::SetDistanceParameter(IsotopicVector DistanceParameter){ - DBGL; + fDistanceParameter=DistanceParameter; fLog->fLog <<"!!INFO!! Distance Parameters "<<endl; @@ -1075,14 +1075,14 @@ void DataBank<IsotopicVector>::SetDistanceParameter(IsotopicVector DistanceParam fLog->fLog << endl; } fLog->fLog << endl; - DBGL; + } //________________________________________________________________________ template<> void DataBank<IsotopicVector>::SetDistanceType(int DistanceType) { - DBGL; + fDistanceType=DistanceType; if(fDistanceType==1){ CalculateDistanceParameter(); @@ -1104,7 +1104,7 @@ void DataBank<IsotopicVector>::SetDistanceType(int DistanceType) << " Distancetype defined by the user isn't recognized by the code"<<endl; exit(1); } - DBGL; + } diff --git a/source/trunk/src/EvolutionData.cxx b/source/trunk/src/EvolutionData.cxx index d6a626fbf..4dbd0a626 100755 --- a/source/trunk/src/EvolutionData.cxx +++ b/source/trunk/src/EvolutionData.cxx @@ -54,7 +54,7 @@ ClassImp(EvolutionData) //________________________________________________________________________ EvolutionData operator*(EvolutionData const& evol, double F) { - DBGL; + EvolutionData evoltmp; map<ZAI ,TGraph* > EvolutionData = evol.GetEvolutionData(); @@ -75,46 +75,46 @@ EvolutionData operator*(EvolutionData const& evol, double F) } evoltmp.SetPower(evol.GetPower()*F); return evoltmp; - DBGL; + } //________________________________________________________________________ EvolutionData operator*(double F, EvolutionData const& evol) { - DBGL; + return evol*F; - DBGL; + } //________________________________________________________________________ EvolutionData operator/(EvolutionData const& evol, double F) { - DBGL; + return evol*(1./F); - DBGL; + } //________________________________________________________________________ //________________________________________________________________________ EvolutionData::EvolutionData() { - DBGL; + fIsCrossSection = false; - DBGL; + } //________________________________________________________________________ EvolutionData::EvolutionData(LogFile* Log) { - DBGL; + fLog = Log; fIsCrossSection = false; - DBGL; + } //________________________________________________________________________ EvolutionData::EvolutionData(LogFile* Log, string DB_file, bool oldread, ZAI zai) { - DBGL; + fLog = Log; fIsCrossSection = false; fDB_file = DB_file; @@ -125,78 +125,78 @@ EvolutionData::EvolutionData(LogFile* Log, string DB_file, bool oldread, ZAI zai ReadDB( fDB_file, oldread); // Read Evolution Produc DB file name - DBGL; + } //________________________________________________________________________ EvolutionData::~EvolutionData() { - DBGL; - DBGL; + + } bool EvolutionData::NucleiInsert(pair<ZAI, TGraph*> zaitoinsert) { - DBGL; + pair<map<ZAI, TGraph*>::iterator, bool> IResult; IResult = fEvolutionData.insert( zaitoinsert); return IResult.second; - DBGL; + } bool EvolutionData::FissionXSInsert(pair<ZAI, TGraph*> zaitoinsert) { - DBGL; + pair<map<ZAI, TGraph*>::iterator, bool> IResult; IResult = fFissionXS.insert( zaitoinsert); return IResult.second; - DBGL; + } bool EvolutionData::CaptureXSInsert(pair<ZAI, TGraph*> zaitoinsert) { - DBGL; + pair<map<ZAI, TGraph*>::iterator, bool> IResult; IResult = fCaptureXS.insert( zaitoinsert); return IResult.second; - DBGL; + } bool EvolutionData::n2nXSInsert(pair<ZAI, TGraph*> zaitoinsert) { - DBGL; + pair<map<ZAI, TGraph*>::iterator, bool> IResult; IResult = fn2nXS.insert( zaitoinsert); return IResult.second; - DBGL; + } //________________________________________________________________________ void EvolutionData::AddAsStable(ZAI zai) { - DBGL; + double time[2] = {0, (500*365.25*3600*24)}; double quantity[2] = {1., 1.}; fEvolutionData.insert(pair<ZAI ,TGraph* >(zai, new TGraph(2, time, quantity) ) ); - DBGL; + } //________________________________________________________________________ Double_t EvolutionData::Interpolate(double t, TGraph& EvolutionGraph) { - DBGL; + TString fOption; return (double)EvolutionGraph.Eval(t,0x0,fOption); - DBGL; + } //________________________________________________________________________ TGraph* EvolutionData::GetEvolutionTGraph(const ZAI& zai) { - DBGL; + map<ZAI ,TGraph *>::iterator it = GetEvolutionData().find(zai) ; if ( it != GetEvolutionData().end() ) @@ -204,13 +204,13 @@ TGraph* EvolutionData::GetEvolutionTGraph(const ZAI& zai) else return new TGraph(); - DBGL; + } //________________________________________________________________________ IsotopicVector EvolutionData::GetIsotopicVectorAt(double t) { - DBGL; + IsotopicVector IsotopicVectorTmp; map<ZAI ,TGraph* >::iterator it; for( it = fEvolutionData.begin(); it != fEvolutionData.end(); it++ ) @@ -218,14 +218,14 @@ IsotopicVector EvolutionData::GetIsotopicVectorAt(double t) IsotopicVectorTmp.Add( (*it).first, Interpolate(t, *((*it).second)) ); } - DBGL; + return IsotopicVectorTmp; } //________________________________________________________________________ double EvolutionData::GetGetXSForAt(double t, ZAI zai, int ReactionId) { - DBGL; + map<ZAI ,TGraph* > XSEvol; switch(ReactionId) { @@ -247,7 +247,7 @@ double EvolutionData::GetGetXSForAt(double t, ZAI zai, int ReactionId) return 0.; else return Interpolate(t, *((*it).second) ); - DBGL; + } @@ -257,7 +257,7 @@ double EvolutionData::GetGetXSForAt(double t, ZAI zai, int ReactionId) EvolutionData EvolutionData::GenerateDBFor(IsotopicVector isotopicvector) { - DBGL; + map<ZAI, pair<double, map< ZAI, double > > > ZAIDecay; @@ -838,7 +838,7 @@ EvolutionData EvolutionData::GenerateDBFor(IsotopicVector isotopicvector) GeneratedDB.SetHMMass(fHMMass*NormFactor ); return GeneratedDB; - DBGL; + } @@ -856,7 +856,7 @@ EvolutionData EvolutionData::GenerateDBFor(IsotopicVector isotopicvector) void EvolutionData::ReadDB(string DBfile, bool oldread) { - DBGL; + if(oldread) { OldReadDB(DBfile); @@ -943,15 +943,15 @@ void EvolutionData::ReadDB(string DBfile, bool oldread) getline(DecayDB, line); - }while ( !DecayDB.eof() ) + }while ( !DecayDB.eof() ); + - DBGL; } void EvolutionData::ReadKeff(string line, double* time, int NTimeStep) { - DBGL; + int start = 0; if( tlc(StringLine::NextWord(line, start, ' ')) != "keff" ) // Check the keyword @@ -974,13 +974,13 @@ void EvolutionData::ReadKeff(string line, double* time, int NTimeStep) fFlux = new TGraph(NTimeStep, time, Keff); // Add the TGraph - DBGL; + } void EvolutionData::ReadFlux(string line, double* time, int NTimeStep) { - DBGL; + int start = 0; @@ -1005,13 +1005,13 @@ void EvolutionData::ReadFlux(string line, double* time, int NTimeStep) ReadInfo(); // Read the .info associeted - DBGL; + } void EvolutionData::ReadInv(string line, double* time, int NTimeStep) { - DBGL; + int start = 0; if( tlc(StringLine::NextWord(line, start, ' ')) != "inv" ) // Check the keyword @@ -1039,13 +1039,13 @@ void EvolutionData::ReadInv(string line, double* time, int NTimeStep) fEvolutionData.insert(pair<ZAI ,TGraph* >(ZAI(Z,A,I), new TGraph(NTimeStep, time, Inv) ) ); } - DBGL; + } void EvolutionData::ReadXSFis(string line, double* time, int NTimeStep) { - DBGL; + int start = 0; if( tlc(StringLine::NextWord(line, start, ' ')) != "xsfis" ) // Check the keyword @@ -1074,12 +1074,12 @@ void EvolutionData::ReadXSFis(string line, double* time, int NTimeStep) fFissionXS.insert(pair<ZAI ,TGraph* >(ZAI(Z,A,I), new TGraph(NTimeStep, time, XSFis) ) ); } - DBGL; + } void EvolutionData::ReadXSCap(string line, double* time, int NTimeStep) { - DBGL; + int start = 0; if( tlc(StringLine::NextWord(line, start, ' ')) != "xscap" ) // Check the keyword @@ -1108,12 +1108,12 @@ void EvolutionData::ReadXSCap(string line, double* time, int NTimeStep) fCaptureXS.insert(pair<ZAI ,TGraph* >(ZAI(Z,A,I), new TGraph(NTimeStep, time, XSCap) ) ); } - DBGL; + } void EvolutionData::ReadXSn2n(string line, double* time, int NTimeStep) { - DBGL; + int start = 0; if( tlc(StringLine::NextWord(line, start, ' ')) != "xsn2n" ) // Check the keyword @@ -1141,7 +1141,7 @@ void EvolutionData::ReadXSn2n(string line, double* time, int NTimeStep) fn2nXS.insert(pair<ZAI ,TGraph* >(ZAI(Z,A,I), new TGraph(NTimeStep, time, XSn2n) ) ); } - DBGL; + } @@ -1195,7 +1195,7 @@ void EvolutionData::ReadInfo() void EvolutionData::OldReadDB(string DBfile) { - DBGL; + { ifstream DecayDB(DBfile.c_str()); // Open the File if(!DecayDB) @@ -1454,7 +1454,7 @@ void EvolutionData::OldReadDB(string DBfile) fHMMass = atof(StringLine::NextWord(line, start, ' ').c_str()); } - DBGL; + } diff --git a/source/trunk/src/FabricationPlant.cxx b/source/trunk/src/FabricationPlant.cxx index bbe421c50..9112ca32b 100644 --- a/source/trunk/src/FabricationPlant.cxx +++ b/source/trunk/src/FabricationPlant.cxx @@ -41,14 +41,14 @@ template <class T> T random(T a, T b) //peak random numebr between a and b FabricationPlant::FabricationPlant() { - DBGL; + - DBGL; + } FabricationPlant::FabricationPlant(LogFile* log) { - DBGL; + fLog = log; fChronologicalTimePriority = false; fFabricationTime = -1; @@ -65,12 +65,12 @@ FabricationPlant::FabricationPlant(LogFile* log) fLog->fLog << "\t Chronological Stock Priority set! "<< endl << endl; fLog->fLog << "!!WARNING!! !!!FabricationPlant!!! You need to set the different stock manually as well as the Fabrication Time Manualy !! " << endl; - DBGL; + } FabricationPlant::FabricationPlant(LogFile* log, Storage* storage, Storage* reusable, double fabircationtime) { - DBGL; + fLog = log; fChronologicalTimePriority = false; @@ -90,7 +90,7 @@ FabricationPlant::FabricationPlant(LogFile* log, Storage* storage, Storage* reus fLog->fLog << "\t Chronological Stock Priority has been set! "<< endl; fLog->fLog << "\t Fabrication time set to \t " << (double)(fFabricationTime/3600/24/365.25) << " year" << endl << endl; - DBGL; + } @@ -98,15 +98,15 @@ FabricationPlant::FabricationPlant(LogFile* log, Storage* storage, Storage* reus //________________________________________________________________________ FabricationPlant::~FabricationPlant() { - DBGL; - DBGL; + + } //________________________________________________________________________ void FabricationPlant::AddValorisableIV(ZAI zai, double factor) { - DBGL; + pair<map<ZAI, double>::iterator, bool> IResult; if(factor > 1) factor = 1; @@ -116,7 +116,7 @@ void FabricationPlant::AddValorisableIV(ZAI zai, double factor) if(IResult.second == false) IResult.first->second = factor; } - DBGL; + } @@ -126,20 +126,20 @@ void FabricationPlant::AddValorisableIV(ZAI zai, double factor) //________________________________________________________________________ void FabricationPlant::Evolution(cSecond t) { - DBGL; + // Check if the FabricationPlant has been created ... if(t == fInternalTime && t != 0) return; // Make the evolution for the FabricationPlant ... FabricationPlantEvolution(t); // ... And Finaly update the AbsoluteInternalTime fInternalTime = t; - DBGL; + } //________________________________________________________________________ void FabricationPlant::FabricationPlantEvolution(cSecond t) { - DBGL; + map<int ,cSecond >::iterator it; @@ -163,14 +163,14 @@ void FabricationPlant::FabricationPlantEvolution(cSecond t) } - DBGL; + } //________________________________________________________________________ void FabricationPlant::BuildFuelForReactor(int ReactorId) { - DBGL; + DataBank<IsotopicVector>* FuelType = fParc->GetReactor()[ReactorId]->GetFuelType(); @@ -363,15 +363,15 @@ void FabricationPlant::BuildFuelForReactor(int ReactorId) } } - DBGL; + } void FabricationPlant::SetSubstitutionFuel(EvolutionData fuel) { - DBGL; + fSubstitutionFuel = true; fSubstitutionEvolutionData = fuel / fuel.GetHMMass(); - DBGL; + } @@ -380,7 +380,7 @@ void FabricationPlant::SetSubstitutionFuel(EvolutionData fuel) //________________________________________________________________________ IsotopicVector FabricationPlant::GetDecay(IsotopicVector isotopicvector, cSecond t) { - DBGL; + IsotopicVector IV; map<ZAI ,double> isotopicquantity = isotopicvector.GetIsotopicQuantity(); @@ -394,7 +394,7 @@ IsotopicVector FabricationPlant::GetDecay(IsotopicVector isotopicvector, cSecond IV += ivtmp; } } - DBGL; + return IV; } @@ -404,7 +404,7 @@ IsotopicVector FabricationPlant::GetDecay(IsotopicVector isotopicvector, cSecond //________________________________________________________________________ EvolutionData FabricationPlant::BuildEvolutiveDB(int ReactorId,IsotopicVector isotopicvector) { - DBGL; + DataBank<IsotopicVector>* evolutiondb = fParc->GetReactor()[ReactorId]->GetFuelType(); isotopicvector = GetDecay(isotopicvector, fFabricationTime); @@ -429,33 +429,33 @@ EvolutionData FabricationPlant::BuildEvolutiveDB(int ReactorId,IsotopicVector is fParc->GetReactor()[ReactorId]->GetPower()); return EvolBuild; - DBGL; + } //________________________________________________________________________ void FabricationPlant::TakeReactorFuel(int Id) { - DBGL; + IsotopicVector IV; map<int ,IsotopicVector >::iterator it2 = fReactorFuturIV.find( Id ); if (it2 != fReactorFuturIV.end()) (*it2).second = IV; - DBGL; + } //________________________________________________________________________ EvolutionData FabricationPlant::GetReactorEvolutionDB(int ReactorId) { - DBGL; + map< int,EvolutionData >::iterator it = fReactorFuturDB.find(ReactorId); return (*it).second; - DBGL; + } IsotopicVector FabricationPlant::GetFullFabrication() { - DBGL; + IsotopicVector tmp = 0*ZAI(0,0,0); map<int, IsotopicVector > reactorNextStep = fReactorFuturIV; @@ -464,7 +464,7 @@ IsotopicVector FabricationPlant::GetFullFabrication() tmp += (*it).second; return tmp; - DBGL; + } //________________________________________________________________________ @@ -473,7 +473,7 @@ IsotopicVector FabricationPlant::GetFullFabrication() IsotopicVector FabricationPlant::GetStockToRecycle() { - DBGL; + IsotopicVector NextStock; int IdToTake = -1; @@ -489,15 +489,15 @@ IsotopicVector FabricationPlant::GetStockToRecycle() else NextStock += ZAI(-1,-1,-1) *1; return NextStock; - DBGL; + } //________________________________________________________________________ void FabricationPlant::RecycleStock(double fraction) { - DBGL; + fFractionToTake.back().second = fraction; - DBGL; + } @@ -505,16 +505,16 @@ void FabricationPlant::RecycleStock(double fraction) //________________________________________________________________________ void FabricationPlant::DumpStock() { - DBGL; - DBGL; + + } //________________________________________________________________________ pair<IsotopicVector, IsotopicVector> FabricationPlant::Separation(IsotopicVector isotopicvector) { - DBGL; + //[0] = re-use ; [1] = waste pair<IsotopicVector, IsotopicVector> IVTmp; @@ -531,7 +531,7 @@ pair<IsotopicVector, IsotopicVector> FabricationPlant::Separation(IsotopicVector } else IVTmp.second.Add( (*it).first, (*it).second ); //waste } - DBGL; + return IVTmp; } diff --git a/source/trunk/src/IsotopicVector.cxx b/source/trunk/src/IsotopicVector.cxx index 75311e5e5..055f59698 100755 --- a/source/trunk/src/IsotopicVector.cxx +++ b/source/trunk/src/IsotopicVector.cxx @@ -37,15 +37,15 @@ ClassImp(IsotopicVector) double Norme(IsotopicVector IV1,int DistanceType, IsotopicVector DistanceParameter) { -DBGL; + IsotopicVector IV; return Distance(IV1, IV, DistanceType,DistanceParameter); -DBGL; + } double DistanceStandard(IsotopicVector IV1, IsotopicVector IV2) { -DBGL; + double d2=0; IsotopicVector IVtmp = IV1 + IV2; map<ZAI ,double> IVtmpIsotopicQuantity = IVtmp.GetIsotopicQuantity(); @@ -57,11 +57,11 @@ DBGL; d2 += pow(Z1-Z2 , 2 ); } return sqrt(d2); -DBGL; + } double DistanceAdjusted(IsotopicVector IV1, IsotopicVector IV2, IsotopicVector DistanceParameter) { -DBGL; + double d2=0; IsotopicVector IVtmp = IV1 + IV2; map<ZAI ,double> IVtmpIsotopicQuantity = IVtmp.GetIsotopicQuantity(); @@ -74,14 +74,14 @@ DBGL; d2 += lambda*abs(Z1-Z2); } return d2; -DBGL; + } double Distance(IsotopicVector IV1, IsotopicVector IV2 ,int DistanceType, IsotopicVector DistanceParameter) { -DBGL; + if(DistanceType==0) { return DistanceStandard(IV1,IV2); @@ -96,13 +96,13 @@ DBGL; exit(1); } -DBGL; + } double RelativDistance(IsotopicVector IV1, IsotopicVector IV2 ) { -DBGL; + double d2 = 0; IsotopicVector IVtmp = IV1 + IV2; @@ -123,40 +123,37 @@ DBGL; d2 += pow( (Z1/Z1total - Z2/Z2total) , 2 ); } -DBGL; + return sqrt(d2); } IsotopicVector operator+(IsotopicVector const& IVa, IsotopicVector const& IVb) { -DBGL; + IsotopicVector IVtmp; IVtmp = IVa; return IVtmp += IVb; -DBGL; } //________________________________________________________________________ IsotopicVector operator-(IsotopicVector const& IVa, IsotopicVector const& IVb) { -DBGL; + IsotopicVector IVtmp; IVtmp = IVa; return IVtmp -= IVb; -DBGL; } //________________________________________________________________________ IsotopicVector operator*(ZAI const& zai, double F) { -DBGL; + IsotopicVector IVtmp; IVtmp.Add( zai, F); return IVtmp; -DBGL; } @@ -177,11 +174,10 @@ IsotopicVector operator*(double F, IsotopicVector const& IVA) {return IVA*F;} //________________________________________________________________________ IsotopicVector operator*(IsotopicVector const& IVA, double F) { -DBGL; + IsotopicVector IV = IVA; IV.Multiply(F); return IV; -DBGL; } IsotopicVector operator*(double F, ZAI const& zai) {return zai*F;} @@ -189,11 +185,10 @@ IsotopicVector operator*(double F, ZAI const& zai) {return zai*F;} //________________________________________________________________________ IsotopicVector operator/(IsotopicVector const& IVA, double F) { -DBGL; + IsotopicVector IV = IVA; IV.Multiply(1./F); return IV; -DBGL; } @@ -202,24 +197,24 @@ DBGL; //________________________________________________________________________ IsotopicVector& IsotopicVector::operator+=(const IsotopicVector& IVa) { -DBGL; + Add(IVa); return *this; -DBGL; + } //________________________________________________________________________ IsotopicVector& IsotopicVector::operator-=(const IsotopicVector& IVa) { -DBGL; + Remove(IVa); return *this; -DBGL; + } bool IsotopicVector::operator<(const IsotopicVector& isotopicvector) const { -DBGL; + if( Norme(*this) != Norme(isotopicvector) ) return Norme(*this) < Norme(isotopicvector); else if( (*this).GetIsotopicQuantity().size() != isotopicvector.GetIsotopicQuantity().size() ) @@ -237,7 +232,7 @@ DBGL; } return false; } -DBGL; + } @@ -246,15 +241,15 @@ DBGL; //________________________________________________________________________ IsotopicVector::IsotopicVector() { -DBGL; -DBGL; + + } //________________________________________________________________________ IsotopicVector::~IsotopicVector() { -DBGL; + } @@ -264,34 +259,34 @@ DBGL; //________________________________________________________________________ void IsotopicVector::Clear() { -DBGL; + fIsotopicQuantityNeeded.clear(); fIsotopicQuantity.clear(); -DBGL; + } //________________________________________________________________________ void IsotopicVector::ClearNeed() { -DBGL; + fIsotopicQuantityNeeded.clear(); -DBGL; + } //________________________________________________________________________ void IsotopicVector::Multiply(double factor) { -DBGL; + map<ZAI ,double >::iterator it; for( it = fIsotopicQuantity.begin(); it != fIsotopicQuantity.end(); it++) (*it).second = (*it).second * factor; -DBGL; + } //________________________________________________________________________ void IsotopicVector::Add(const ZAI& zai, double quantity) { -DBGL; + if( ceil(quantity*1e25) - quantity*1e25 > quantity*1e25 - floor(quantity*1e25) ) quantity = floor(quantity*1e25)*1/1e25; else quantity = ceil(quantity*1e25)*1/1e25; @@ -305,30 +300,30 @@ DBGL; IResult.first->second += quantity; } -DBGL; + } //________________________________________________________________________ void IsotopicVector::Add(const IsotopicVector& isotopicvector) { -DBGL; + map<ZAI ,double> isotopicquantity = isotopicvector.GetIsotopicQuantity(); map<ZAI ,double >::iterator it; for( it = isotopicquantity.begin(); it != isotopicquantity.end(); it++) Add( (*it).first, (*it).second); -DBGL; + } //________________________________________________________________________ void IsotopicVector::Add(const map<ZAI ,double>& quantity) { -DBGL; + map<ZAI ,double> isotopicquantity = quantity; map<ZAI ,double >::iterator it; for( it = isotopicquantity.begin(); it != isotopicquantity.end(); it++) Add( (*it).first, (*it).second); -DBGL; + } @@ -336,7 +331,7 @@ DBGL; //________________________________________________________________________ void IsotopicVector::Remove(const ZAI& zai, double quantity) { -DBGL; + map<ZAI ,double>::iterator it; it = fIsotopicQuantity.find(zai); @@ -362,25 +357,25 @@ DBGL; Need(zai, quantity); } } -DBGL; + } //________________________________________________________________________ void IsotopicVector::Remove(const IsotopicVector& isotopicvector) { -DBGL; + map<ZAI ,double> isotopicquantity = isotopicvector.GetIsotopicQuantity(); map<ZAI ,double >::iterator it; for( it = isotopicquantity.begin(); it != isotopicquantity.end(); it++) Remove( (*it).first, (*it).second); -DBGL; + } //________________________________________________________________________ void IsotopicVector::Need(const ZAI& zai, double quantity) { -DBGL; + if( ceil(quantity*1e25) - quantity*1e25 > quantity*1e25 - floor(quantity*1e25) ) quantity = floor(quantity*1e25)*1/1e25; else quantity = ceil(quantity*1e25)*1/1e25; @@ -393,7 +388,7 @@ DBGL; if(IResult.second == false) IResult.first->second += quantity; } -DBGL; + } @@ -401,24 +396,24 @@ DBGL; //________________________________________________________________________ void IsotopicVector::Need(const IsotopicVector& isotopicvector) { -DBGL; + map<ZAI ,double> isotopicquantity = isotopicvector.GetIsotopicQuantity(); map<ZAI ,double >::iterator it; for( it = isotopicquantity.begin(); it != isotopicquantity.end(); it++) Need( (*it).first, (*it).second); -DBGL; + } //________________________________________________________________________ double IsotopicVector::GetZAIIsotopicQuantity(const ZAI& zai) const { -DBGL; + map<ZAI ,double> IsotopicQuantity = fIsotopicQuantity; map<ZAI ,double>::iterator it; it = IsotopicQuantity.find(zai); - DBGL; + if ( it != IsotopicQuantity.end() ) { @@ -433,14 +428,14 @@ DBGL; //________________________________________________________________________ double IsotopicVector::GetZAIIsotopicQuantity(const int z, const int a, const int i) const { -DBGL; + ZAI zai(z, a, i); return GetZAIIsotopicQuantity(zai); } IsotopicVector IsotopicVector::GetSpeciesComposition(int z) const { -DBGL; + IsotopicVector IV; map<ZAI ,double > IsotopicQuantity = GetIsotopicQuantity(); map<ZAI ,double >::iterator it; @@ -450,22 +445,22 @@ DBGL; IV += (*it).first * (*it).second; return IV; -DBGL; + } IsotopicVector IsotopicVector::GetActinidesComposition() const { - DBGL; + IsotopicVector IV; for (int i = 0; i <12; i++) IV += GetSpeciesComposition(89+i); return IV; - DBGL; + } vector<int> IsotopicVector::GetChemicalSpecies() const { -DBGL; + vector<int> ChemicalSpecies; map<ZAI ,double > IsotopicQuantity = GetIsotopicQuantity(); @@ -474,7 +469,7 @@ DBGL; if( (int)ChemicalSpecies.size() ==0 || (*it).first.Z() != ChemicalSpecies.back() ) ChemicalSpecies.push_back((*it).first.Z()); -DBGL; + return ChemicalSpecies; } @@ -503,7 +498,7 @@ void IsotopicVector::Write(string filename, cSecond time) const //________________________________________________________________________ void IsotopicVector::Print(string option) const { -DBGL; + cout << "**************************" << endl; cout << "*Isotopic Vector Property*" << endl; cout << "**************************" << endl << endl; @@ -543,7 +538,7 @@ DBGL; { cout << "****Isotopic Vector DB****" << endl; } -DBGL; + } diff --git a/source/trunk/src/LogFile.cxx b/source/trunk/src/LogFile.cxx index e87904b7e..574c975d8 100755 --- a/source/trunk/src/LogFile.cxx +++ b/source/trunk/src/LogFile.cxx @@ -17,7 +17,7 @@ using namespace std; LogFile::LogFile(string LogFileName ) { -DBGL; + fLog.open(LogFileName.c_str()); if(!fLog) @@ -27,15 +27,15 @@ DBGL; } else cout << "LogFile: " << LogFileName << " opened." << endl; -DBGL; + } //________________________________________________________________________ LogFile::~LogFile() { -DBGL; + fLog.close(); -DBGL; + } diff --git a/source/trunk/src/Pool.cxx b/source/trunk/src/Pool.cxx index e4affbb4c..2c61516fc 100755 --- a/source/trunk/src/Pool.cxx +++ b/source/trunk/src/Pool.cxx @@ -25,14 +25,14 @@ ClassImp(Pool) Pool::Pool() { -DBGL; -DBGL; + + } Pool::Pool(LogFile* log) { - DBGL; + fLog = log; fCoolingTime = 5*3600.*24.*365.25; @@ -54,13 +54,13 @@ Pool::Pool(LogFile* log) fLog->fLog << "\t The Cooling Time set at\t " << (double)(fCoolingTime/3600/24/365.25) << " year" << endl; fLog->fLog << "!!WARNING!! !!!Pool!!! All Cooled Fuel goes directly to WASTE after cooling !! " << endl; - DBGL; + } //________________________________________________________________________ Pool::Pool(LogFile* log, double creation, double coolingtime) { -DBGL; + fLog = log; fCoolingTime = (cSecond)coolingtime; fInternalTime = 0; @@ -81,7 +81,7 @@ DBGL; fLog->fLog << "\t The Cooling Time set at\t " << (double)(fCoolingTime/3600/24/365.25) << " year" << endl; fLog->fLog << "!!WARNING!! !!!Pool!!! All Cooled Fuel goes directly to WASTE after cooling !! " << endl; -DBGL; + } //________________________________________________________________________ @@ -89,7 +89,7 @@ Pool::Pool(LogFile* log, Storage* storage, double creation, double coolingtime) { -DBGL; + fLog = log; fCoolingTime = (cSecond)coolingtime; fInternalTime = 0; @@ -110,14 +110,14 @@ DBGL; fLog->fLog << "\t Life time (Operating's Duration) set at \t " << (double)(fCreationTime/3600/24/365.25) << " year" << endl << endl; fLog->fLog << "\t The Cooling Time set at\t " << (double)(fCoolingTime/3600/24/365.25) << " year" << endl; -DBGL; + } //________________________________________________________________________ Pool::~Pool() { -DBGL; -DBGL; + + } @@ -128,7 +128,7 @@ DBGL; //________________________________________________________________________ IsotopicVector Pool::GetDecay(IsotopicVector isotopicvector, cSecond t) { -DBGL; + IsotopicVector IV; map<ZAI ,double> isotopicquantity = isotopicvector.GetIsotopicQuantity(); map<ZAI ,double >::iterator it; @@ -140,9 +140,8 @@ DBGL; IV += ivtmp; } } -DBGL; + return IV; -DBGL; } @@ -153,35 +152,35 @@ DBGL; //________________________________________________________________________ void Pool::AddIVCooling(IsotopicVector IV) { -DBGL; + fIVCooling.push_back(IV); fCoolingStartingTime.push_back(fInternalTime); fCoolingLastIndex++; fCoolingIndex.push_back(fCoolingLastIndex); -DBGL; + } //________________________________________________________________________ void Pool::RemoveIVCooling(int i) //!< Remove a Cooling IsotopicVector { -DBGL; + fIVCooling.erase(fIVCooling.begin()+i); fCoolingStartingTime.erase(fCoolingStartingTime.begin()+i); fCoolingIndex.erase(fCoolingIndex.begin()+i); -DBGL; + } IsotopicVector Pool::GetFullCooling() { -DBGL; + IsotopicVector tmp = 0*ZAI(0,0,0); for(int i =0; i< (int)fIVCooling.size(); i++) tmp += fIVCooling[i]; return tmp; -DBGL; + } @@ -199,7 +198,7 @@ DBGL; //________________________________________________________________________ void Pool::CoolingEvolution(cSecond t) { -DBGL; + if(t == fInternalTime && t!=0) return; int RemainingCoolingTime; cSecond EvolutionTime = t - fInternalTime; @@ -233,14 +232,14 @@ DBGL; } #pragma omp critical(DeleteCoolingIVPB) {sort (fCoolingEndOfCycle.begin(), fCoolingEndOfCycle.end());} -DBGL; + } //________________________________________________________________________ void Pool::Evolution(cSecond t) { -DBGL; + // Check if the TF has been created ... if(t<fCreationTime) return; if(t == fInternalTime && t!=0) return; @@ -258,7 +257,7 @@ DBGL; fInternalTime = t; -DBGL; + } diff --git a/source/trunk/src/Reactor.cxx b/source/trunk/src/Reactor.cxx index d78eb391a..bada111f5 100755 --- a/source/trunk/src/Reactor.cxx +++ b/source/trunk/src/Reactor.cxx @@ -26,15 +26,15 @@ ClassImp(Reactor) Reactor::Reactor() { - DBGL; - DBGL; + + } Reactor::Reactor(LogFile* log) { - DBGL; + fLog = log; - DBGL; + } Reactor::Reactor(LogFile* log, DataBank<IsotopicVector>* fueltypeDB, @@ -42,7 +42,7 @@ Reactor::Reactor(LogFile* log, DataBank<IsotopicVector>* fueltypeDB, Pool* Pool, double creationtime, double lifetime) { - DBGL; + fLog = log; fIsStarted = false; @@ -81,14 +81,14 @@ Reactor::Reactor(LogFile* log, DataBank<IsotopicVector>* fueltypeDB, fLog->fLog << "\t Life time (Operating's Duration) set at \t " << (double)(fLifeTime/3600/24/365.25) << " year" << endl << endl; fLog->fLog << "!!WARNING!! !!!Reactor!!! You need to set Burn-up/Power/CycleTime (2 of 3) & Heavy Metal Mass Manualy !! " << endl; - DBGL; + } Reactor::Reactor(LogFile* log, DataBank<IsotopicVector>* fueltypeDB, FabricationPlant* fabricationplant, Pool* Pool, double creationtime, double lifetime, double Power, double HMMass, double BurnUp, double ChargeFactor) { - DBGL; + fLog = log; fIsStarted = false; @@ -135,7 +135,7 @@ Reactor::Reactor(LogFile* log, DataBank<IsotopicVector>* fueltypeDB, Fabricatio fLog->fLog << "\t The corresponding Cycle Time is\t " << (double)(fCycleTime/3600/24/365.25) << " year" << endl; fLog->fLog << "\t The Heavy Metal Mass in the Core set at " << (double)(fHeavyMetalMass) << " tons" << endl << endl; - DBGL; + } Reactor::Reactor(LogFile* log, DataBank<IsotopicVector>* fueltypeDB, @@ -144,7 +144,7 @@ Reactor::Reactor(LogFile* log, DataBank<IsotopicVector>* fueltypeDB, double creationtime, double lifetime, double cycletime, double HMMass, double BurnUp) { - DBGL; + fLog = log; fIsStarted = false; @@ -188,7 +188,7 @@ Reactor::Reactor(LogFile* log, DataBank<IsotopicVector>* fueltypeDB, fLog->fLog << "\t The corresponding Effective Thermal Power is \t " << (double)(fPower *1e-6) << " MW" << endl; fLog->fLog << "\t The Heavy Metal Mass in the Core set at " << (double)(fHeavyMetalMass) << " tons" << endl << endl; - DBGL; + } @@ -198,7 +198,7 @@ Reactor::Reactor(LogFile* log, EvolutionData evolutivedb, double lifetime, double power, double HMMass, double BurnUp, double ChargeFactor ) { - DBGL; + fLog = log; fIsStarted = false; @@ -267,15 +267,15 @@ Reactor::Reactor(LogFile* log, EvolutionData evolutivedb, fLog->fLog << "\t The Effective Thermal Power is \t " << (double)(fPower *1e-6) << " MW (with Full Power " << power << " and " << ChargeFactor << " Charge Factor)"<< endl; fLog->fLog << "\t The Heavy Metal Mass in the Core set at " << (double)(fHeavyMetalMass) << " tons" << endl << endl; - DBGL; + } //________________________________________________________________________ Reactor::~Reactor() { - DBGL; - DBGL; + + } //________________________________________________________________________ @@ -311,26 +311,26 @@ void Reactor::SetPower(double Power) //________________________________________________________________________ void Reactor::SetEvolutionDB(EvolutionData evolutionDB) { - DBGL; + fEvolutionDB = evolutionDB; fIVOutCycle = fEvolutionDB.GetIsotopicVectorAt( (cSecond)(fCycleTime/fEvolutionDB.GetPower()*fPower) ); fIVBeginCycle = fEvolutionDB.GetIsotopicVectorAt(0); - DBGL; + } //________________________________________________________________________ void Reactor::SetNewFuel(EvolutionData ivdb) { - DBGL; + SetEvolutionDB(ivdb); - DBGL; + } //________________________________________________________________________ void Reactor::Evolution(cSecond t) { - DBGL; + if( fShutDown == true || t < fCreationTime ) return; // Reactor stop or not started... @@ -345,8 +345,8 @@ void Reactor::Evolution(cSecond t) } - if( t == fInternalTime && t!=0 ) return - DBGL; + if( t == fInternalTime && t!=0 ) return; + if(fInternalTime == 0 && fIsStarted == false) // Start of the Reactor @@ -395,13 +395,13 @@ void Reactor::Evolution(cSecond t) exit(1); } - DBGL; + } //________________________________________________________________________ void Reactor::Dump() { -DBGL; + if(fInternalTime < fCreationTime) return; if(fShutDown == true && fIsStarted == false) return; // Reactor stopped... @@ -502,7 +502,7 @@ DBGL; } -DBGL; + } diff --git a/source/trunk/src/Storage.cxx b/source/trunk/src/Storage.cxx index dfcd68446..a0160c540 100644 --- a/source/trunk/src/Storage.cxx +++ b/source/trunk/src/Storage.cxx @@ -24,25 +24,25 @@ ClassImp(Storage) Storage::Storage() { -DBGL; + -DBGL; + } Storage::Storage(LogFile* log) { - DBGL; + fLog = log; cout << "!!INFO!! !!!Storage!!! A new Storage has been define." << endl; fLog->fLog << "!!INFO!! !!!Storage!!! A new Storage has been define." << endl; - DBGL; + } //________________________________________________________________________ Storage::Storage(LogFile* log, DataBank<ZAI>* evolutivedb) { -DBGL; + fLog = log; fInternalTime = 0; fDecayDataBase = evolutivedb; @@ -51,14 +51,14 @@ DBGL; fLog->fLog << "!!INFO!! !!!Storage!!! A new Storage has been define." << endl; -DBGL; + } //________________________________________________________________________ Storage::~Storage() { -DBGL; -DBGL; + + } @@ -67,7 +67,7 @@ DBGL; //________________________________________________________________________ IsotopicVector Storage::GetDecay(IsotopicVector isotopicvector, cSecond t) { -DBGL; + IsotopicVector IV; map<ZAI ,double> isotopicquantity = isotopicvector.GetIsotopicQuantity(); @@ -80,35 +80,35 @@ DBGL; IV += ivtmp; } } -DBGL; + return IV; -DBGL; + } //________________________________________________________________________ void Storage::ClearStock() { -DBGL; + IsotopicVector EmptyIV; fIVFullStock = EmptyIV; fIVStock.clear(); -DBGL; + } //________________________________________________________________________ void Storage::AddToStock(IsotopicVector isotopicvector) { -DBGL; + if(fParc->GetStockManagement() == true) fIVStock.push_back(isotopicvector); AddToFullStock(isotopicvector); -DBGL; + } //________________________________________________________________________ void Storage::TakeFractionFromStock(int IVId,double fraction) { -DBGL; + if(fParc->GetStockManagement() == true) { if(fraction > 1 || fraction < 0) @@ -134,12 +134,12 @@ DBGL; } -DBGL; + } void Storage::TakeFromStock(IsotopicVector isotopicvector) { -DBGL; + if(fParc->GetStockManagement() == false) fIVFullStock -= isotopicvector; else @@ -148,13 +148,13 @@ DBGL; fLog->fLog << "!!Warning!! !!!Storage!!! TakeFromStock can't be DEFINE WITH REAL stock management" << endl; exit(1); } -DBGL; + } //________________________________________________________________________ void Storage::StorageEvolution(cSecond t) { -DBGL; + if(t == fInternalTime && t !=0 ) return; @@ -176,13 +176,13 @@ DBGL; -DBGL; + } //________________________________________________________________________ void Storage::Evolution(cSecond t) { -DBGL; + // Check if the Storage has been created ... if(t == fInternalTime && t!=0) return; // Make the evolution for the Storage ... @@ -191,17 +191,17 @@ DBGL; fInternalTime = t; -DBGL; + } void Storage::Write(string filename, cSecond date) { -DBGL; + for(int i=0;i < (int)fIVStock.size(); i++) { fIVStock[i].Write(filename, date); } -DBGL; + } diff --git a/source/trunk/src/ZAI.cxx b/source/trunk/src/ZAI.cxx index e69f1d3ad..c7328cde5 100755 --- a/source/trunk/src/ZAI.cxx +++ b/source/trunk/src/ZAI.cxx @@ -26,33 +26,33 @@ ZAI& ZAI::operator=(ZAI& IVa) ZAI::ZAI() { - DBGL; + fName=""; fZ=0; fA=0; fI=0; fMass=0; - DBGL; + } ZAI::~ZAI() { - DBGL; + } //________________________________________________________________________ ZAI::ZAI(int Z, int A, int I) { - DBGL; + fZ=Z; fA=A; fI=I; - DBGL; + } //________________________________________________________________________ double ZAI::GetMass() { - DBGL; + return fMass; } -- GitLab