diff --git a/Utils/XSM/MLP/Generate/Generate_XSM.cxx b/Utils/XSM/MLP/Generate/Generate_XSM.cxx index c864c2c9284b3f2a2be529ef93b7a1284bbd0402..f8ab27643f78d8a042856ac74c422d3e63d3cdbb 100644 --- a/Utils/XSM/MLP/Generate/Generate_XSM.cxx +++ b/Utils/XSM/MLP/Generate/Generate_XSM.cxx @@ -427,7 +427,7 @@ void FillMapName() int A = 0; int I = 0; string Name; - cout << "Z -> "; cin >> Z ; cout <<" A -> "; cin >> A ; cout <<" I -> "; cin >> I ;cout <<" Name -> "; cin >> Name; + cout << " Z -> "; cin >> Z ; cout <<" A -> "; cin >> A ; cout <<" I -> "; cin >> I ;cout <<" Name -> "; cin >> Name; fMapName.insert(pair<ZAI,string> ( ZAI(Z,A,I) ,Name) ); } @@ -610,8 +610,8 @@ void CreateInfoFile() InfoFile << endl; InfoFile << "Irradiation time steps [s] :"<<endl; InfoFile << "K_TIMESTEP"; - for( int t = 0 ; t < fNOfTimeStep ; t++ ) - InfoFile <<" "<<fTime[t]; + for( int t = 0 ; t < fNOfTimeStep[0] ; t++ ) /// DANGER IF NOT THE SAME TIME BINNING FOR EACH EVOLUTION DATA => Futher work : get the vector with the shortest irrariaiton time to avoid extrapolation in CLASS + InfoFile <<" "<<fTime[0][t]; InfoFile << endl<<endl; InfoFile << "Z A I Name (input MLP) :"<<endl; for(map<ZAI,string>::iterator it = fMapName.begin() ; it != fMapName.end() ; it++ ) @@ -660,18 +660,17 @@ return AllCompoOfZAI; void ProgressBar(double loopindex, double totalindex) { // Reset the line - for(int i = 0; i < 22; i++) - cout << " "; + //for(int i = 0; i < 22; i++) + // cout << " "; cout << flush ; - cout << "\r\033[47m \033[0m\033[42m"; + cout << "\033[42m"; for(int i = 0; i < (int)(loopindex/totalindex*44.0); i++) cout << " "; - cout<<" \033[0m"; + cout<<" \033[41m"; for(int i = 44; i >= (int)(loopindex/totalindex*44.0); i--) cout << " "; - cout << "\033[47m \033[0m "; - + cout<<"\033[0m"; cout << (int)(loopindex/totalindex*100) << "%\r"; cout << flush; //cout << endl; @@ -745,16 +744,16 @@ void DumpInputNeuron(string filename) /**********************init map********************/ map < ZAI,vector<double> > mAllXS; - map < ZAI, vector<double> > mAllInventories; - for(int act=0;act<int(fAllNuclei.size());act++ ) - { - vector<double> InitVect; - for(int Tstep=0 ;Tstep<fNOfTimeStep;Tstep++) - { - InitVect.push_back(0); - } - mAllInventories.insert( pair<ZAI,vector<double> >(fAllNuclei[act],InitVect) ); - } + //map < ZAI, vector<double> > mAllInventories; + //for(int act=0;act<int(fAllNuclei.size());act++ ) + //{ + // vector<double> InitVect; + // for(int Tstep=0 ;Tstep<fNOfTimeStep;Tstep++) + // { + // InitVect.push_back(0); + // } + // mAllInventories.insert( pair<ZAI,vector<double> >(fAllNuclei[act],InitVect) ); + //} for(int act=0;act<int(fAllNuclei.size());act++ ) { @@ -841,9 +840,9 @@ void DumpInputNeuron(string filename) } /////////////////////////////////////////////////////// - for(int Tstep=0 ;Tstep<fNOfTimeStep;Tstep++ ) + for(int Tstep=0 ;Tstep<fNOfTimeStep[b];Tstep++ ) { - Time=fTime[Tstep]; + Time=fTime[b][Tstep]; for(int act=0;act<int(fAllNuclei.size());act++) { @@ -960,8 +959,9 @@ void ReadAndFill(string jobname) while(start < (int)line.size()) vT.push_back(atof(StringLine::NextWord(line, start, ' ').c_str())); - fNOfTimeStep=int(vT.size()); + fTime.push_back(vT); + fNOfTimeStep.push_back(int(vT.size())); /****Getting Inventories***/ getline(DecayDB, line); do @@ -986,7 +986,6 @@ void ReadAndFill(string jobname) if(!fIsAllNucleiAlreadyFill) { fAllNuclei.push_back(zaitmp); - fTime=vT; } long double q = atof(StringLine::NextWord(line, start, ' ').c_str()); diff --git a/Utils/XSM/MLP/Generate/include/Generate_XSM.hxx b/Utils/XSM/MLP/Generate/include/Generate_XSM.hxx index 742d6ef1c8c0179601562507e4146c7af7455bdf..5057cd3b1a00114b40c6e06483fdd0a90fb453ae 100644 --- a/Utils/XSM/MLP/Generate/include/Generate_XSM.hxx +++ b/Utils/XSM/MLP/Generate/include/Generate_XSM.hxx @@ -30,7 +30,7 @@ string DataPath; vector<string> JobName; vector<string> GoodJobName; -vector<double> fTime; //Time vector of the depletion calculation (second) +vector< vector<double> > fTime; //Time vector of each depletion calculation (second) vector<ZAI> fAllNuclei; //All the nuclei present in the fuel vector< map < ZAI, vector<double> > > fXSFis; // map of fission cross section fXSFis[NumberOfTheEvolution][ZAI][TimeStep] @@ -41,7 +41,7 @@ vector<IsotopicVector> fActinideCompoInit; //Fresh fuel composition in atomic pr vector<double> fHMMass; //Vector of initial Heavy metal mass (every element should be egual or very very close !!) -int fNOfTimeStep=0; //number of time step in the Evolution +vector<int> fNOfTimeStep; //number of time step in each Evolution data int fReactionCounter=0;//number of nuclear reactions to train string fEvolutionDataFolder = "";