@@ -299,6 +299,10 @@ void CheckPoint::compute_file_suffix(int cycle, std::stringstream& fileSuffix) {
299299 fileSuffix << ".sw4checkpoint" ;
300300}
301301
302+ void CheckPoint ::compute_file_suffix (const char * cycle , std ::stringstream & fileSuffix ) {
303+ fileSuffix << mCheckPointFile << "." << cycle << ".sw4checkpoint" ;
304+ }
305+
302306//-----------------------------------------------------------------------
303307void CheckPoint ::write_checkpoint (float_sw4 a_time , int a_cycle ,
304308 vector < Sarray > & a_Um , vector < Sarray > & a_U ,
@@ -606,7 +610,7 @@ float_sw4 CheckPoint::getDt() {
606610 // TODO: this is not right, but you get the idea...
607611 std ::stringstream fileSuffix ;
608612 compute_file_suffix (cycle_num , fileSuffix );
609- s << fileSuffix ;
613+ s << fileSuffix . str () ;
610614
611615 // Ask SCR for the path to open our checkpoint file
612616 char scr_file [SCR_MAX_FILENAME ];
@@ -1382,7 +1386,7 @@ void CheckPoint::read_checkpoint_hdf5(float_sw4& a_time, int& a_cycle,
13821386 // TODO: this is not right, but you get the idea...
13831387 std ::stringstream fileSuffix ;
13841388 compute_file_suffix (cycle_num , fileSuffix );
1385- s << fileSuffix ;
1389+ s << fileSuffix . str () ;
13861390
13871391 // Ask SCR for the path to open our checkpoint file
13881392 char scr_file [SCR_MAX_FILENAME ];
0 commit comments