Skip to content
Snippets Groups Projects
Commit 3b829883 authored by Baptiste LENIAU's avatar Baptiste LENIAU
Browse files

Add forgotten keywords for file nfo reading and methods to read

git-svn-id: svn+ssh://svn.in2p3.fr/class@695 0e7d625b-0364-4367-a6be-d5be4a48d228
parent 127b9bc9
No related branches found
No related tags found
No related merge requests found
......@@ -31,10 +31,18 @@ EQM_PWR_MLP_Kinf::EQM_PWR_MLP_Kinf(string WeightPathAlpha0, string WeightPathAlp
fTMVAWeightPath.push_back(WeightPathAlpha1);
fTMVAWeightPath.push_back(WeightPathAlpha2);
fMaximalBU = 0;
fMaximalContent = 0;
fInformationFile = InformationFile;
LoadKeyword();
ReadNFO();//Getting information from fMLPInformationFile
if( fMaximalBU == 0 || fMaximalContent == 0 )
{
ERROR<<"Can't find the k_maxfiscontent and/or k_maxburnup keyword(s) in .nfo file\n this is mandatory"<<endl;
exit(0);
}
fNumberOfBatch = NumOfBatch;
fKThreshold = CriticalityThreshold ;
SetBurnUpPrecision(0.005);//1 % of the targeted burnup
......@@ -58,10 +66,18 @@ EQM_PWR_MLP_Kinf::EQM_PWR_MLP_Kinf(CLASSLogger* log, string WeightPathAlpha0, st
fTMVAWeightPath.push_back(WeightPathAlpha1);
fTMVAWeightPath.push_back(WeightPathAlpha2);
fMaximalBU = 0;
fMaximalContent = 0;
fInformationFile = InformationFile;
LoadKeyword();
ReadNFO();//Getting information from fMLPInformationFile
if( fMaximalBU == 0 || fMaximalContent == 0 )
{
ERROR<<"Can't find the k_maxfiscontent and/or k_maxburnup keyword(s) in .nfo file\n this is mandatory"<<endl;
exit(0);
}
fNumberOfBatch = NumOfBatch;
fKThreshold = CriticalityThreshold ;
SetBurnUpPrecision(0.005);//1 % of the targeted burnup
......@@ -88,10 +104,18 @@ EQM_PWR_MLP_Kinf::EQM_PWR_MLP_Kinf(string TMVAWeightPath, int NumOfBatch, strin
if(InformationFile == "")
InformationFile = StringLine::ReplaceAll(TMVAWeightPath,".xml",".nfo");
fMaximalBU = 0;
fMaximalContent = 0;
fInformationFile = InformationFile;
LoadKeyword();
ReadNFO();//Getting information from fMLPInformationFile
if( fMaximalBU == 0 || fMaximalContent == 0 )
{
ERROR<<"Can't find the k_maxfiscontent and/or k_maxburnup keyword(s) in .nfo file\n this is mandatory"<<endl;
exit(0);
}
fNumberOfBatch = NumOfBatch;
fKThreshold = CriticalityThreshold ;
SetBurnUpPrecision(0.005);//1 % of the targeted burnup
......@@ -114,10 +138,18 @@ EQM_PWR_MLP_Kinf::EQM_PWR_MLP_Kinf(CLASSLogger* log, string TMVAWeightPath, int
if(InformationFile == "")
InformationFile = StringLine::ReplaceAll(TMVAWeightPath,".xml",".nfo");
fMaximalBU = 0;
fMaximalContent = 0;
fInformationFile = InformationFile;
LoadKeyword();
ReadNFO();//Getting information from fMLPInformationFile
if( fMaximalBU == 0 || fMaximalContent == 0 )
{
ERROR<<"Can't find the k_maxfiscontent and/or k_maxburnup keyword(s) in .nfo file\n this is mandatory"<<endl;
exit(0);
}
fNumberOfBatch = NumOfBatch;
fKThreshold = CriticalityThreshold ;
SetBurnUpPrecision(0.005);//1 % of the targeted burnup
......@@ -138,7 +170,8 @@ void EQM_PWR_MLP_Kinf::LoadKeyword()
DBGL
fDKeyword.insert( pair<string, PWR_MLP_KINF_DMthPtr>( "k_zainame", &EQM_PWR_MLP_Kinf::ReadZAIName) );
fDKeyword.insert( pair<string, PWR_MLP_KINF_DMthPtr>( "k_maxburnup", &EQM_PWR_MLP_Kinf::ReadMaxBurnUp) );
fDKeyword.insert( pair<string, PWR_MLP_KINF_DMthPtr>( "k_maxfiscontent", &EQM_PWR_MLP_Kinf::ReadMaxFisContent) );
DBGL
}
......@@ -163,8 +196,38 @@ void EQM_PWR_MLP_Kinf::ReadZAIName(const string &line)
DBGL
}
//________________________________________________________________________
void EQM_PWR_MLP_Kinf::ReadMaxBurnUp(const string &line)
{
DBGL
int pos = 0;
string keyword = tlc(StringLine::NextWord(line, pos, ' '));
if( keyword != "k_maxburnup" ) // Check the keyword
{
ERROR << " Bad keyword : \"k_maxburnup\" not found !" << endl;
exit(1);
}
fMaximalBU = atof(StringLine::NextWord(line, pos, ' ').c_str());
DBGL
}
//________________________________________________________________________
void EQM_PWR_MLP_Kinf::ReadMaxFisContent(const string &line)
{
DBGL
int pos = 0;
string keyword = tlc(StringLine::NextWord(line, pos, ' '));
if( keyword != "k_maxfiscontent" ) // Check the keyword
{
ERROR << " Bad keyword : \"k_maxfiscontent\" not found !" << endl;
exit(1);
}
fMaximalContent = atof(StringLine::NextWord(line, pos, ' ').c_str());
DBGL
}
//________________________________________________________________________
void EQM_PWR_MLP_Kinf::ReadLine(string line)
{
......
......@@ -153,6 +153,22 @@ class EQM_PWR_MLP_Kinf : public EquivalenceModel
void ReadZAIName(const string &line);
//}
//{
/// ReadMaxBurnUp : read a guessed (very overestimated) maximum burnup a fuel can reach (purpose : algorithm initialization)
/*!
\param line : line suppossed to contain the ZAI name starts with "k_zainame" keyword
*/
void ReadMaxBurnUp(const string &line);
//}
//{
/// ReadMaxFisContent : read a guessed (very overestimated) maximum fissile content (purpose : algorithm initialization)
/*!
\param line : line suppossed to contain the ZAI name starts with "k_zainame" keyword
*/
void ReadMaxFisContent(const string &line);
//}
//{
/// ReadLine : read a line
/*!
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment