@@ -206,8 +206,7 @@ void COutput::SetHistoryOutput(CGeometry *geometry,
206206 unsigned long TimeIter,
207207 unsigned long OuterIter,
208208 unsigned long InnerIter) {
209-
210- curTimeIter = TimeIter;
209+ curTimeIter = TimeIter;
211210 curAbsTimeIter = max (TimeIter, config->GetStartWindowIteration ()) - config->GetStartWindowIteration ();
212211 curOuterIter = OuterIter;
213212 curInnerIter = InnerIter;
@@ -273,7 +272,7 @@ void COutput::SetHistoryOutput(CGeometry ****geometry, CSolver *****solver, CCon
273272
274273void COutput::SetMultizoneHistoryOutput (COutput **output, CConfig **config, CConfig *driver_config, unsigned long TimeIter, unsigned long OuterIter){
275274
276- curTimeIter = TimeIter;
275+ curTimeIter = TimeIter;
277276 curAbsTimeIter = max (TimeIter, driver_config->GetStartWindowIteration ()) - driver_config->GetStartWindowIteration ();
278277 curOuterIter = OuterIter;
279278
@@ -389,6 +388,9 @@ void COutput::WriteToFile(CConfig *config, CGeometry *geometry, OUTPUT_TYPE form
389388 /* --- File writer that will later be used to write the file to disk. Created below in the "switch" ---*/
390389 CFileWriter *fileWriter = nullptr ;
391390
391+ /* --- Set current time iter even if history file is not written ---*/
392+ curTimeIter = config->GetTimeIter ();
393+
392394 /* --- If it is still present, strip the extension (suffix) from the filename ---*/
393395 const auto lastindex = fileName.find_last_of (' .' );
394396 fileName = fileName.substr (0 , lastindex);
@@ -476,7 +478,7 @@ void COutput::WriteToFile(CConfig *config, CGeometry *geometry, OUTPUT_TYPE form
476478 extension = CSU2MeshFileWriter::fileExt;
477479
478480 if (fileName.empty ())
479- fileName = volumeFilename;
481+ fileName = config-> GetFilename ( volumeFilename, " " , curTimeIter) ;
480482
481483 if (!config->GetWrt_Volume_Overwrite ())
482484 filename_iter = config->GetFilename_Iter (fileName, curInnerIter, curOuterIter);
0 commit comments