create legacy mode for color simulator

This commit is contained in:
JamesEMcclure 2021-06-30 10:39:28 -04:00
parent ca25caf21a
commit 8ef4651db8

View File

@ -34,15 +34,15 @@ int main( int argc, char **argv )
// Load the input database // Load the input database
auto db = std::make_shared<Database>( argv[1] ); auto db = std::make_shared<Database>( argv[1] );
if (argc > 2) { if (argc > 2) {
SimulationMode = "development"; SimulationMode = "legacy";
} }
if ( rank == 0 ) { if ( rank == 0 ) {
printf( "********************************************************\n" ); printf( "********************************************************\n" );
printf( "Running Color LBM \n" ); printf( "Running Color LBM \n" );
printf( "********************************************************\n" ); printf( "********************************************************\n" );
if (SimulationMode == "development") if (SimulationMode == "legacy")
printf("**** DEVELOPMENT MODE ENABLED *************\n"); printf("**** LEGACY MODE ENABLED *************\n");
} }
// Initialize compute device // Initialize compute device
int device = ScaLBL_SetDevice( rank ); int device = ScaLBL_SetDevice( rank );
@ -66,7 +66,10 @@ int main( int argc, char **argv )
// structure and allocate variables // structure and allocate variables
ColorModel.Initialize(); // initializing the model will set initial conditions for variables ColorModel.Initialize(); // initializing the model will set initial conditions for variables
if (SimulationMode == "development"){ if (SimulationMode == "legacy"){
ColorModel.Run();
}
else {
double MLUPS=0.0; double MLUPS=0.0;
int timestep = 0; int timestep = 0;
bool ContinueSimulation = true; bool ContinueSimulation = true;
@ -174,9 +177,8 @@ int main( int argc, char **argv )
/*********************************************************/ /*********************************************************/
} }
} }
else
ColorModel.Run();
PROFILE_STOP( "Main" ); PROFILE_STOP( "Main" );
auto file = db->getWithDefault<std::string>( "TimerFile", "lbpm_color_simulator" ); auto file = db->getWithDefault<std::string>( "TimerFile", "lbpm_color_simulator" );
auto level = db->getWithDefault<int>( "TimerLevel", 1 ); auto level = db->getWithDefault<int>( "TimerLevel", 1 );