diff --git a/src/IO/io.cpp b/src/IO/io.cpp index 3949319..bbe961e 100644 --- a/src/IO/io.cpp +++ b/src/IO/io.cpp @@ -16,11 +16,13 @@ //============================================================================ #include "io.h" +#include IO::IO(Apothesis* apothesis):Pointers(apothesis), m_sLatticeType("NONE"), m_sProcess("process"), m_sLattice("lattice"), + m_sRuns("runs"), m_sTemperature("temperature"), m_sPressure("pressure"), m_sTime("time"), @@ -31,7 +33,8 @@ IO::IO(Apothesis* apothesis):Pointers(apothesis), m_sGrowth("growth"), m_sCommentLine("#"), m_sPrecursors("precursors"), - m_sReport("report") + m_sReport("report"), + m_sHeights("heights.txt") { //Initialize the map for the lattice m_mLatticeType[ "NONE" ] = Lattice::NONE; @@ -53,7 +56,7 @@ string IO::getInputPath() const {;} void IO::readInputFile() { - list< string > lKeywords{ m_sLattice, m_sPressure, m_sTemperature, m_sTime, m_sSteps, m_sRandom, m_sSpecies, m_sWrite, m_sGrowth, m_sReport}; + list< string > lKeywords{ m_sLattice, m_sPressure, m_sTemperature, m_sTime, m_sSteps, m_sRandom, m_sSpecies, m_sWrite, m_sGrowth, m_sReport,m_sRuns}; string sLine; while ( getline( m_InputFile, sLine ) ) { @@ -95,61 +98,123 @@ void IO::readInputFile() } } - if ( vsTokensBasic[ 0].compare( m_sLattice ) == 0 ){ - - vector vsTokens; - vsTokens = split( vsTokensBasic[ 1 ], string( " " ) ); - - bool bComment = false; - for ( unsigned int i = 0; i< vsTokens.size(); i++){ - if ( !bComment && startsWith( vsTokens[ i ], m_sCommentLine ) ) - bComment = true; - - // Remove the comments from the tokens so not to consider them - if ( bComment ) - vsTokens[ i ].clear(); - } - - // Remove any empty parts of the vector - vector::iterator it = remove_if( vsTokens.begin(), vsTokens.end(), mem_fun_ref(&string::empty) ); - vsTokensBasic.erase( it, vsTokens.end() ); - - m_parameters->setLatticeType( vsTokens[ 0 ] ); - - if ( isNumber( vsTokens[ 1 ] ) ){ - m_parameters->setLatticeXDim( toInt( trim( vsTokens[ 1 ] ) ) ); - } - else { - m_errorHandler->error_simple_msg("The x dimension of lattice is not a number."); - EXIT - } - - if ( isNumber( vsTokens[ 2 ] ) ){ - m_parameters->setLatticeYDim( toInt( trim( vsTokens[ 2 ] ) ) ); - } - else { - m_errorHandler->error_simple_msg("The y dimension of lattice is not a number."); - EXIT - } - - if ( isNumber( vsTokens[ 3 ] ) ){ - m_parameters->setLatticeHeight( toInt( trim( vsTokens[ 3 ] ) ) ); - } - else { - m_errorHandler->error_simple_msg("The height must be a number."); - EXIT + if(vsTokensBasic[0].compare(m_sRuns)==0){ + if(isNumber(trim(vsTokensBasic[1]))){ + m_parameters->setRuns(toInt(trim(vsTokensBasic[1]))); + m_parameters->setMultipleRunFlag(); } + } - if ( !vsTokens[ 4 ].empty() ) - m_parameters->setLatticeLabels( vsTokens[4] ) ; - else { - m_errorHandler->error_simple_msg("You must specify a species that the lattice is composed off."); - EXIT + if ( vsTokensBasic[ 0].compare( m_sLattice ) == 0 ){ + if ( trim(vsTokensBasic[ 1]).compare( m_sHeights ) == 0) { + // Check if the input line contains a filename for height with the given name of heights.txt + string heightFileName = trim(vsTokensBasic[1]); + ifstream heightFile(heightFileName); + + if (heightFile.good()) { + // Read heights from the file + string line; + getline(heightFile, line); + vector vsTokens = split(line, " "); + + if (vsTokens.size() != 5 ) { + m_errorHandler->error_simple_msg("Invalid heights header format "); + EXIT + } + m_parameters->setLatticeType( trim( vsTokens[ 1 ] ) ); + + if ( isNumber( vsTokens[ 2 ] ) ){ + m_parameters->setLatticeXDim( toInt( trim( vsTokens[ 2 ] ) ) ); + } + else { + m_errorHandler->error_simple_msg("The x dimension of lattice is not a number."); + EXIT + } + + if ( isNumber( vsTokens[ 3 ] ) ){ + m_parameters->setLatticeYDim( toInt( trim( vsTokens[ 3 ] ) ) ); + } + else { + m_errorHandler->error_simple_msg("`The y dimension of lattice is not a number."); + EXIT + } + int latticeXDim = m_parameters->getLatticeXDim(); + int latticeYDim = m_parameters->getLatticeYDim(); + vector> heights(latticeYDim, vector(latticeXDim)); + + for (int i = 0; i < latticeYDim; ++i) { + for (int j = 0; j < latticeXDim; ++j) { + if (!(heightFile >> heights[i][j])) { + m_errorHandler->error_simple_msg("Error reading heights from file."); + EXIT + } + } + } + + m_parameters->setHeightData(heights); + m_parameters->setHeightFileExists(true); + m_parameters->setLatticeLabels(vsTokens[4]); + heightFile.close(); + } else { + m_errorHandler->error_simple_msg("Failed to open height file: " + heightFileName); + EXIT + } + } + else{ + vector vsTokens; + vsTokens = split( vsTokensBasic[ 1 ], string( " " ) ); + + bool bComment = false; + for ( unsigned int i = 0; i< vsTokens.size(); i++){ + if ( !bComment && startsWith( vsTokens[ i ], m_sCommentLine ) ) + bComment = true; + + // Remove the comments from the tokens so not to consider them + if ( bComment ) + vsTokens[ i ].clear(); + } + + // Remove any empty parts of the vector + vector::iterator it = remove_if( vsTokens.begin(), vsTokens.end(), mem_fun_ref(&string::empty) ); + vsTokensBasic.erase( it, vsTokens.end() ); + + m_parameters->setLatticeType( vsTokens[ 0 ] ); + + if ( isNumber( vsTokens[ 1 ] ) ){ + m_parameters->setLatticeXDim( toInt( trim( vsTokens[ 1 ] ) ) ); + } + else { + m_errorHandler->error_simple_msg("The x dimension of lattice is not a number."); + EXIT + } + + if ( isNumber( vsTokens[ 2 ] ) ){ + m_parameters->setLatticeYDim( toInt( trim( vsTokens[ 2 ] ) ) ); + } + else { + m_errorHandler->error_simple_msg("The y dimension of lattice is not a number."); + EXIT + } + + if ( isNumber( vsTokens[ 3 ] ) ){ + m_parameters->setLatticeHeight( toInt( trim( vsTokens[ 3 ] ) ) ); + } + else { + m_errorHandler->error_simple_msg("The height must be a number."); + EXIT + } + + if ( !vsTokens[ 4 ].empty() ) + m_parameters->setLatticeLabels( vsTokens[4] ) ; + else { + m_errorHandler->error_simple_msg("You must specify a species that the lattice is composed off."); + EXIT + } + m_parameters->setHeightFileExists(false); + continue; + } } - continue; - } - if (vsTokensBasic[ 0].compare( m_sGrowth ) == 0){ vector vsTokens; vsTokens = split( vsTokensBasic[ 1 ], string( " " ) ); @@ -786,6 +851,137 @@ pair IO::analyzeCompound( string reactant ) { return react; } +vector>IO::readHeightFile(string location) +{ + string heightFileName = location; + ifstream heightFile(heightFileName); + + if (heightFile.good()) { + // Read heights from the file + string line; + getline(heightFile, line); + //skip the first line + + int latticeXDim = m_parameters->getLatticeXDim(); + int latticeYDim = m_parameters->getLatticeYDim(); + vector> heights(latticeYDim, vector(latticeXDim)); + + for (int i = 0; i < latticeYDim; ++i) { + for (int j = 0; j < latticeXDim; ++j) { + if (!(heightFile >> heights[i][j])) { + m_errorHandler->error_simple_msg("Error reading heights from file."); + EXIT + } + } + } + + m_parameters->setHeightData(heights); + m_parameters->setHeightFileExists(true); + //m_parameters->setLatticeLabels(vsTokens[4]); + heightFile.close(); + return heights; + + } +} + + +vector>IO::readSpeciesFile(string location) +{ + string speciesFileName = location; + ifstream speciesFile(speciesFileName); + + if (speciesFile.good()) { + // Read heights from the file + string line; + getline(speciesFile, line); + //skip the first line + + int latticeXDim = m_parameters->getLatticeXDim(); + int latticeYDim = m_parameters->getLatticeYDim(); + vector> species(latticeYDim, vector(latticeXDim)); + + for (int i = 0; i < latticeYDim; ++i) { + for (int j = 0; j < latticeXDim; ++j) { + if (!( speciesFile>> species[i][j])) { + m_errorHandler->error_simple_msg("Error reading species from file."); + EXIT + } + } + } + + speciesFile.close(); + return species; + + } +} + + +void IO::writeLatticeHeightsInFolder(double time, const std::string& folder_path) +{ + // Ensure the directory exists + std::filesystem::path dir_path(folder_path); + if (!std::filesystem::exists(dir_path)) { + std::filesystem::create_directories(dir_path); + std::cout << "Created directory: " << dir_path << std::endl; + } + + // Create the file name + std::ostringstream streamObj; + streamObj.precision(15); + streamObj << time; + std::string file_name = "Height_" + streamObj.str() + ".dat"; + + // Combine the directory path and file name + std::filesystem::path file_path = dir_path / file_name; + + std::ofstream file(file_path); + if (!file.is_open()) { + std::cerr << "Error: Could not open file " << file_path << std::endl; + return; + } + + file << "Time (s): " << time << std::endl; + for (int i = 0; i < m_lattice->getY(); i++) { + for (int j = 0; j < m_lattice->getX(); j++) + file << m_lattice->getSite(i*m_lattice->getX() + j)->getHeight() << " "; + file << std::endl; + } + + file.close(); +} + + +void IO::writeLatticeSpeciesInFolder( double time,const std::string& folder_path ) +{ + std::filesystem::path dir_path(folder_path); + if (!std::filesystem::exists(dir_path)) { + std::filesystem::create_directories(dir_path); + std::cout << "Created directory: " << dir_path << std::endl; + } + // Create an output string stream + ostringstream streamObj; + //Add double to stream + streamObj.precision(15); + streamObj << time; + + std::string file_name="SurfaceSpecies_" + streamObj.str() + ".dat"; + // Combine the directory path and file name + std::filesystem::path file_path = dir_path / file_name; + std::ofstream file(file_name); + + if (!file.is_open()) { + std::cerr << "Error: Could not open file " << file_path << std::endl; + return; + } + file << "Time (s): " << time << endl; + file.precision(10); + for (int i = 0; i < m_lattice->getY(); i++){ + for (int j = 0; j < m_lattice->getX(); j++) + file << m_lattice->getSite( i*m_lattice->getX() + j )->getLabel() << " " ; + file << std::endl; + } + file.close(); +} \ No newline at end of file diff --git a/src/IO/io.h b/src/IO/io.h index e5f9ecb..9bfbd27 100644 --- a/src/IO/io.h +++ b/src/IO/io.h @@ -58,6 +58,7 @@ class Pointers; class IO: public Pointers { public: + enum CASE{ Sensitive, Insensitive }; IO(); @@ -104,6 +105,9 @@ class IO: public Pointers /// Reads the input file " .kmc". void readInputFile(); + /// not implemented yet + void readSurfaceSpeciesFile(); + /// Converts a string to double. double toDouble( string ); @@ -188,9 +192,19 @@ class IO: public Pointers static inline string trim(std::string &s) { rtrim(s); ltrim(s); - return s; + return s; } + // read a height file at a given location + vector>readHeightFile(string); + + // read a species file at a given location + vector>readSpeciesFile(string); + + void writeLatticeHeightsInFolder(double , const std::string&); + + void writeLatticeSpeciesInFolder(double , const std::string&); + protected: /// The type of lattice string m_sLatticeType; @@ -252,6 +266,12 @@ class IO: public Pointers /// The keyword for reporting additionl properties (currently only supports coverages) string m_sReport; + + /// The keyword for storing the name of heights file. + string m_sHeights; + + ///The keyword for number of runs + string m_sRuns; // trim from start (in place) static inline void ltrim(std::string &s) { diff --git a/src/apothesis.cpp b/src/apothesis.cpp index 290fa7c..e703f81 100644 --- a/src/apothesis.cpp +++ b/src/apothesis.cpp @@ -29,6 +29,7 @@ #include #include "reader.h" #include "reaction.h" +// #include "src/processes/parameters.h" #include "lattice.h" #include "FCC.h" @@ -106,7 +107,14 @@ void Apothesis::init() pLattice->setX( pParameters->getLatticeXDim() ); pLattice->setY( pParameters->getLatticeYDim() ); - pLattice->setInitialHeight( pParameters->getLatticeHeight() ); + if (pParameters->getHeightFileExist()){ + pLattice->setInitialHeightAllSites( pParameters->getHeightData() ); + pLattice->setVariableHeightsFromFile( true ); + } + else{ + pLattice->setInitialHeight( pParameters->getLatticeHeight() ); + pLattice->setVariableHeightsFromFile( false ); + } pLattice->setLabels( pParameters->getLatticeLabels() ); pLattice->build(); @@ -596,12 +604,37 @@ void Apothesis::exec() } pIO->writeInOutput( output ); + + if(pParameters->getMultipleRunFlag()){ + + int curr_run = pParameters->getCurrRunNum(); + + // Create the folder name + std::string folder_name = "Run" + std::to_string(curr_run); + + // Create a path object + std::filesystem::path dir_path = std::filesystem::current_path() / folder_name; + + // Create the directory + if (!std::filesystem::exists(dir_path)) { + std::filesystem::create_directory(dir_path); + std::cout << "Created directory: " << dir_path << std::endl; + } else { + std::cout << "Directory already exists: " << dir_path << std::endl; + } + + // Convert the path to a string and call writeLatticeHeightsInFolder + pIO->writeLatticeHeightsInFolder(m_dProcTime, dir_path.string()); + pIO->writeLatticeHeightsInFolder(m_dProcTime, dir_path.string()); + + } if ( m_bHasGrowth ) pIO->writeLatticeHeights( m_dProcTime ); if ( m_bReportCoverages ) pIO->writeLatticeSpecies( m_dProcTime ); + } void Apothesis::logSuccessfulRead(bool read, string parameter) diff --git a/src/apothesis.h b/src/apothesis.h index 49b6cc9..6bca8cd 100644 --- a/src/apothesis.h +++ b/src/apothesis.h @@ -93,7 +93,7 @@ class Apothesis private: /// The process map which holds all the processes and the sites that each can be performed. - unordered_map< MicroProcesses::Process*, set< SurfaceTiles::Site* > > m_processMap; + map< MicroProcesses::Process*, set< SurfaceTiles::Site* > > m_processMap; /// The number of flags given by the user int m_iArgc; diff --git a/src/extLibs/random_generator.h b/src/extLibs/random_generator.h index 4bcbd34..adf3a38 100644 --- a/src/extLibs/random_generator.h +++ b/src/extLibs/random_generator.h @@ -5,7 +5,7 @@ #include "pointers.h" #include -#include "time.h" +//#include "time.h" #include "extLibs/randomc.h" diff --git a/src/heights.txt b/src/heights.txt new file mode 100644 index 0000000..62ea415 --- /dev/null +++ b/src/heights.txt @@ -0,0 +1,11 @@ +heights: SimpleCubic 10 10 +15 15 14 11 15 12 15 15 13 15 +14 12 15 13 14 12 12 12 14 14 +11 14 14 12 15 12 14 11 14 11 +12 10 11 13 14 14 15 13 11 12 +12 14 11 11 15 12 16 11 11 12 +11 12 15 15 13 14 14 14 16 11 +10 11 15 12 12 10 13 12 11 10 +11 16 15 13 11 14 12 14 13 11 +15 11 14 15 15 15 10 13 13 15 +15 15 14 11 15 12 15 15 13 15 diff --git a/src/input.kmc b/src/input.kmc index 9ab69ff..e439a6c 100644 --- a/src/input.kmc +++ b/src/input.kmc @@ -1,9 +1,9 @@ #Build the lattice -lattice: SimpleCubic 100 100 10 A - +lattice: heights.txt +#lattice: SimpleCubic 100 100 10 A #The growing film growth: CO2 - +runs: 2 #Create steps (alaways in the x-direaction - see above 1st number), number of steps #(e.g. if 10 each step will consist of two atoms), height difference (each step will increase by 20, so 1st step: 10, 2nd: 30, 3rd, 50 etc) #steps: 2 1 diff --git a/src/lattice/SimpleCubic.cpp b/src/lattice/SimpleCubic.cpp index 7815734..5701d79 100644 --- a/src/lattice/SimpleCubic.cpp +++ b/src/lattice/SimpleCubic.cpp @@ -38,7 +38,7 @@ void SimpleCubic::buildSteps() int iStep = 0; int iHeight = 0; - //Steps in x-direction + //Steps in x-direction for (int i = 0; i < m_iSizeX; i++) { if ( iStep == iPerStep ) { iStep = 0; @@ -84,27 +84,42 @@ void SimpleCubic::build() m_errorHandler->warningSimple_msg("The lattice initial height is too small.Consider revising."); } + // The sites of the lattice. m_vSites.resize( getSize() ); for (int i = 0; i < m_vSites.size(); i++) m_vSites[i] = new Site(); - //This is OK - for (int i = 0; i < m_iSizeX; i++) - { - for (int j = i * m_iSizeY; j < (m_iSizeY + i * m_iSizeY); j++) + + if (m_variableHeightsFromFile){ + int icount = 0; + for (int i = 0; i < m_iSizeX; i++) + { + for (int j = 0; j < m_iSizeY; j++) { + + icount = i * m_iSizeY + j; + m_vSites[icount]->setID(icount); + m_vSites[icount]->setHeight(m_iHeightsAll[ i ][ j ]); + } + } + } + else{ + for (int i = 0; i < m_iSizeX; i++) { - m_vSites[j]->setID(j); - m_vSites[j]->setHeight(m_iHeight); + for (int j = i * m_iSizeY; j < (m_iSizeY + i * m_iSizeY); j++) + { + m_vSites[j]->setID(j); + m_vSites[j]->setHeight(m_iHeight); + } } } + mf_neigh(); - // Here we set the label of the species for (int i = 0; i < m_iSizeY; i++){ for (int j = 0; j < m_iSizeX; j++) - m_vSites[ i*m_iSizeX + j ]->setLabel( m_sLabel ); + m_vSites[ i*m_iSizeX + j ]->setLabel( m_sLabel ); } } diff --git a/src/lattice/lattice.cpp b/src/lattice/lattice.cpp index 9969938..16a6204 100644 --- a/src/lattice/lattice.cpp +++ b/src/lattice/lattice.cpp @@ -19,7 +19,6 @@ Lattice::Lattice(Apothesis *apothesis) : Pointers(apothesis),m_iStepDiff(0) { - } void Lattice::setType(string sType) diff --git a/src/lattice/lattice.h b/src/lattice/lattice.h index 8c2dcea..c578eb5 100644 --- a/src/lattice/lattice.h +++ b/src/lattice/lattice.h @@ -154,6 +154,20 @@ class Lattice: public Pointers /// Returns the coverages of each species adsorbed virtual unordered_map computeCoverages( vector species ){} + /// Sets the height across all sites + inline void setInitialHeightAllSites(vector> heights){ + + m_iHeightsAll.resize( heights.size() ); + for ( int i = 0; i < heights.size(); i++) + m_iHeightsAll[ i ].resize( heights[ i ].size() ); + + for ( int i = 0; i < heights.size(); i++) + for ( int j = 0; j < heights[i].size(); j++) + m_iHeightsAll[ i ][ j ] = heights[ i ][ j ]; + } + + /// sets a flag variable to know if the height across sites is different and read from a file + inline void setVariableHeightsFromFile( bool var ){ m_variableHeightsFromFile = var; } protected: /// The size of the lattice in the x-dimension. int m_iSizeX; @@ -164,6 +178,9 @@ class Lattice: public Pointers /// The minimum initialize size of the lattice. int m_iHeight; + /// Initial heights across all sites + vector> m_iHeightsAll; + /// The type of the lattice: BCC, FCC etc. Type m_Type; @@ -195,6 +212,9 @@ class Lattice: public Pointers /// The coveraages at each time unordered_map m_mCoverages; + + /// Flag to know if the height is variable across sites + bool m_variableHeightsFromFile; }; #endif // LATTICE_H diff --git a/src/main.cpp b/src/main.cpp index 979541a..22ed496 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -35,6 +35,7 @@ #include "lattice.h" #include "process.h" #include "apothesis.h" +#include "src/IO/io.h" using namespace std; using namespace MicroProcesses; @@ -52,6 +53,23 @@ int main( int argc, char* argv[] ) apothesis->exec(); cout << "Apothesis finished succesfully." << endl; + int run = apothesis->pParameters->getCurrRunNum(); + int total_runs = apothesis->pParameters->getRuns(); + while(run!=total_runs){ + //reinitialize heights and species + //current height file + // string latestHeightFileLocation = apothesis->pParameters->getLatestHeightFileLocation(); + // vector>currHeights = apothesis->pIO->readHeightFile(latestHeightFileLocation); + // apothesis->pLattice->setInitialHeightAllSites(latestHeightFileLocation); + + // string latestSpeciesFileLocation = apothesis->pParameters->getLatestSpeciesFileLocation(); + // vector> + + // //apothesis->init()->initnewSurface(); + apothesis->exec(); + apothesis->pParameters->setCurrRunNum(run++); + } + if ( apothesis ) delete apothesis; } diff --git a/src/processes/adsorption_rules.cpp b/src/processes/adsorption_rules.cpp index c3a9afa..a055bd0 100644 --- a/src/processes/adsorption_rules.cpp +++ b/src/processes/adsorption_rules.cpp @@ -27,7 +27,7 @@ bool multiSpeciesRule(Adsorption* proc, Site* s){ //1. If the species is not occupied //2. and if neighbours equal to the sites needed by m_iNumSites are vacant - //3. and have the same height return true + //3. and have the same height return true (checked inside countVacantSites) //4. Return false if ( s->isOccupied() || proc->countVacantSites(s) != proc->getNumVacantSites() ) return false; diff --git a/src/processes/parameters.h b/src/processes/parameters.h index b2fb533..bea580f 100644 --- a/src/processes/parameters.h +++ b/src/processes/parameters.h @@ -123,15 +123,48 @@ class Parameters: public Pointers /// Returns the type of the lattice inline string getLatticeType(){ return m_sLatticeType; } + /// set the total number of runs + inline void setRuns(int runs){m_sRuns = runs;} + + /// returns the number of runs remaining + inline int getRuns(){return m_sRuns;} + + /// returns the current run number + inline int getCurrRunNum(){return m_sCurrRun;} + + /// set the current run number + inline int setCurrRunNum(int run){m_sCurrRun = run;} + + /// flag to check if multiple runs + inline void setMultipleRunFlag(){m_sMultipleRunFlag = true;} + + /// get the multiple run flag + inline bool getMultipleRunFlag(){return m_sMultipleRunFlag;} + /// Sets the dimensions of the lattice inline void setLatticeXDim( int x ){ m_iX = x; } inline void setLatticeYDim( int y ){ m_iY = y; } inline void setLatticeHeight( int h ){ m_iH = h; } + inline void setHeightFileExists(bool var){m_heightFileExist = var;} + + inline void setHeightData(vector> height){ + + m_height.resize( height.size() ); + for ( int i = 0; i < height.size(); i++) + m_height[ i ].resize( height[ i ].size() ); + + for ( int i = 0; i < height.size(); i++) + for ( int j = 0; j < height[ i ].size(); j++) + m_height[ i ][ j ] = height[ i ][ j ]; + } inline int getLatticeXDim(){ return m_iX; } inline int getLatticeYDim(){ return m_iY; } inline int getLatticeHeight(){ return m_iH; } + inline bool getHeightFileExist(){ return m_heightFileExist; } + inline vector> getHeightData(){return m_height;} + protected: /// Parameters of the lattice @@ -173,6 +206,20 @@ class Parameters: public Pointers /// The species to compute coverage for vector m_vCovSpecies; + /// Height Data of all sites + vector> m_height; + + /// Bool to notify if height file exists or not + bool m_heightFileExist; + + ///total number of runs + int m_sRuns = 0; + + ///current run number + int m_sCurrRun=0; + + ///multiple run flag + bool m_sMultipleRunFlag= false; }; }