deprecate Restart.txt

This commit is contained in:
James McClure
2019-08-22 13:26:06 -04:00
parent 608e2d7b41
commit 137fdbc87e
2 changed files with 1 additions and 16 deletions

View File

@@ -859,9 +859,6 @@ void runAnalysis::run( std::shared_ptr<Database> input_db, TwoPhase& Averages, c
if (timestep%d_restart_interval==0){
if (d_rank==0) {
FILE *Rst = fopen("Restart.txt","w");
fprintf(Rst,"%i\n",timestep+4);
fclose(Rst);
input_db->putScalar<bool>( "Restart", true );
std::ofstream OutStream("Restart.db");
input_db->print(OutStream, "");
@@ -966,9 +963,6 @@ void runAnalysis::basic( std::shared_ptr<Database> input_db, SubPhase &Averages,
ScaLBL_CopyToHost(cDen.get(),Den,2*d_Np*sizeof(double));
if (d_rank==0) {
FILE *Rst = fopen("Restart.txt","w");
fprintf(Rst,"%i\n",timestep+4);
fclose(Rst);
color_db->putScalar<bool>( "Restart", true );
input_db->putDatabase("Color", color_db);
std::ofstream OutStream("Restart.db");

View File

@@ -373,17 +373,8 @@ void ScaLBL_ColorModel::Initialize(){
if (Restart == true){
if (rank==0){
printf("Reading restart file! \n");
ifstream restart("Restart.txt");
if (restart.is_open()){
restart >> timestep;
printf("Restarting from timestep =%i \n",timestep);
}
else{
printf("WARNING:No Restart.txt file, setting timestep=0 \n");
timestep=0;
}
}
MPI_Bcast(&timestep,1,MPI_INT,0,comm);
// Read in the restart file to CPU buffers
int *TmpMap;
TmpMap = new int[Np];