Skip to content

Commit

Permalink
Merge pull request #2418 from su2code/fix_UnstNames
Browse files Browse the repository at this point in the history
Fix output names of unsteady simulation
  • Loading branch information
pcarruscag authored Jan 24, 2025
2 parents 181af08 + fcd27d9 commit 1f449b2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions SU2_CFD/src/output/COutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,7 @@ void COutput::SetHistoryOutput(CGeometry *geometry,
unsigned long TimeIter,
unsigned long OuterIter,
unsigned long InnerIter) {

curTimeIter = TimeIter;
curTimeIter = TimeIter;
curAbsTimeIter = max(TimeIter, config->GetStartWindowIteration()) - config->GetStartWindowIteration();
curOuterIter = OuterIter;
curInnerIter = InnerIter;
Expand Down Expand Up @@ -273,7 +272,7 @@ void COutput::SetHistoryOutput(CGeometry ****geometry, CSolver *****solver, CCon

void COutput::SetMultizoneHistoryOutput(COutput **output, CConfig **config, CConfig *driver_config, unsigned long TimeIter, unsigned long OuterIter){

curTimeIter = TimeIter;
curTimeIter = TimeIter;
curAbsTimeIter = max(TimeIter, driver_config->GetStartWindowIteration()) - driver_config->GetStartWindowIteration();
curOuterIter = OuterIter;

Expand Down Expand Up @@ -389,6 +388,9 @@ void COutput::WriteToFile(CConfig *config, CGeometry *geometry, OUTPUT_TYPE form
/*--- File writer that will later be used to write the file to disk. Created below in the "switch" ---*/
CFileWriter *fileWriter = nullptr;

/*--- Set current time iter even if history file is not written ---*/
curTimeIter = config->GetTimeIter();

/*--- If it is still present, strip the extension (suffix) from the filename ---*/
const auto lastindex = fileName.find_last_of('.');
fileName = fileName.substr(0, lastindex);
Expand Down Expand Up @@ -476,7 +478,7 @@ void COutput::WriteToFile(CConfig *config, CGeometry *geometry, OUTPUT_TYPE form
extension = CSU2MeshFileWriter::fileExt;

if (fileName.empty())
fileName = volumeFilename;
fileName = config->GetFilename(volumeFilename, "", curTimeIter);

if (!config->GetWrt_Volume_Overwrite())
filename_iter = config->GetFilename_Iter(fileName, curInnerIter, curOuterIter);
Expand Down

0 comments on commit 1f449b2

Please sign in to comment.