mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
data: Reset solver data only when non-sub cycled time index changes
Resolves bug report https://bugs.openfoam.org/view.php?id=3189
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -45,7 +45,7 @@ Foam::data::data(const objectRegistry& obr)
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
),
|
||||
prevTimeIndex_(0)
|
||||
prevTimeIndex_(-1)
|
||||
{
|
||||
set("solverPerformance", dictionary());
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2015-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -40,10 +40,15 @@ void Foam::data::setSolverPerformance
|
||||
|
||||
List<SolverPerformance<Type>> perfs;
|
||||
|
||||
if (prevTimeIndex_ != this->time().timeIndex())
|
||||
const label timeIndex =
|
||||
this->time().subCycling()
|
||||
? this->time().prevTimeState().timeIndex()
|
||||
: this->time().timeIndex();
|
||||
|
||||
if (prevTimeIndex_ != timeIndex)
|
||||
{
|
||||
// Reset solver performance between iterations
|
||||
prevTimeIndex_ = this->time().timeIndex();
|
||||
prevTimeIndex_ = timeIndex;
|
||||
dict.clear();
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user