Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-6

This commit is contained in:
Henry Weller
2019-03-15 11:53:09 +00:00
2 changed files with 10 additions and 5 deletions

View File

@ -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());
}

View File

@ -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