Skip to content

Commit b88ed07

Browse files
author
rois1995
committed
- Added output function to set curTimeIter
1 parent 110773c commit b88ed07

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

SU2_CFD/include/output/COutput.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,12 @@ class COutput {
418418
*/
419419
void SetMultizoneHistoryOutput(COutput** output, CConfig **config, CConfig *driver_config,
420420
unsigned long TimeIter, unsigned long OuterIter);
421+
422+
/*!
423+
* \brief Sets the current time iteration
424+
* \param[in] timeIter - the current time iteration
425+
*/
426+
inline void SetCurTimeIter(unsigned long val_curTimeIter) {curTimeIter = val_curTimeIter;}
421427

422428
/*!
423429
* \brief Sets the volume output filename

SU2_CFD/src/iteration/CFluidIteration.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,8 @@ void CFluidIteration::Solve(COutput* output, CIntegration**** integration, CGeom
376376
/*--- Boolean to determine if we are running a static or dynamic case ---*/
377377
bool steady = !config[val_iZone]->GetTime_Domain();
378378

379+
if (!steady) output->SetCurTimeIter(config[val_iZone]->GetTimeIter());
380+
379381
unsigned long Inner_Iter, nInner_Iter = config[val_iZone]->GetnInner_Iter();
380382
bool StopCalc = false;
381383

SU2_CFD/src/output/COutput.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,6 @@ void COutput::SetHistoryOutput(CGeometry *geometry,
207207
unsigned long OuterIter,
208208
unsigned long InnerIter) {
209209

210-
curTimeIter = TimeIter;
211210
curAbsTimeIter = max(TimeIter, config->GetStartWindowIteration()) - config->GetStartWindowIteration();
212211
curOuterIter = OuterIter;
213212
curInnerIter = InnerIter;
@@ -273,7 +272,6 @@ void COutput::SetHistoryOutput(CGeometry ****geometry, CSolver *****solver, CCon
273272

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

276-
curTimeIter = TimeIter;
277275
curAbsTimeIter = max(TimeIter, driver_config->GetStartWindowIteration()) - driver_config->GetStartWindowIteration();
278276
curOuterIter = OuterIter;
279277

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

392-
/*--- Set current time iter even if history file is not written ---*/
393-
curTimeIter = config->GetTimeIter();
394-
395390
/*--- If it is still present, strip the extension (suffix) from the filename ---*/
396391
const auto lastindex = fileName.find_last_of('.');
397392
fileName = fileName.substr(0, lastindex);

0 commit comments

Comments
 (0)