mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: reconstructPar: -newTimes cleanup
This commit is contained in:
@ -143,8 +143,6 @@ int main(int argc, char *argv[])
|
|||||||
args
|
args
|
||||||
);
|
);
|
||||||
|
|
||||||
instantList masterTimeDirs = runTime.times();
|
|
||||||
|
|
||||||
if (timeDirs.empty())
|
if (timeDirs.empty())
|
||||||
{
|
{
|
||||||
FatalErrorIn(args.executable())
|
FatalErrorIn(args.executable())
|
||||||
@ -152,6 +150,16 @@ int main(int argc, char *argv[])
|
|||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Get current times if -newTimes
|
||||||
|
instantList masterTimeDirs;
|
||||||
|
if (newTimes)
|
||||||
|
{
|
||||||
|
masterTimeDirs = runTime.times();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# include "createNamedMesh.H"
|
# include "createNamedMesh.H"
|
||||||
word regionDir = word::null;
|
word regionDir = word::null;
|
||||||
if (regionName != fvMesh::defaultRegion)
|
if (regionName != fvMesh::defaultRegion)
|
||||||
@ -176,11 +184,24 @@ int main(int argc, char *argv[])
|
|||||||
// Loop over all times
|
// Loop over all times
|
||||||
forAll(timeDirs, timeI)
|
forAll(timeDirs, timeI)
|
||||||
{
|
{
|
||||||
if (newTimes && findIndex(masterTimeDirs, timeDirs[timeI]) != -1)
|
if (newTimes)
|
||||||
{
|
{
|
||||||
Info<< "Skipping time " << timeDirs[timeI].name()
|
// Compare on timeName, not value
|
||||||
<< endl << endl;
|
bool foundTime = false;
|
||||||
continue;
|
forAll(masterTimeDirs, i)
|
||||||
|
{
|
||||||
|
if (masterTimeDirs[i].name() == timeDirs[timeI].name())
|
||||||
|
{
|
||||||
|
foundTime = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (foundTime)
|
||||||
|
{
|
||||||
|
Info<< "Skipping time " << timeDirs[timeI].name()
|
||||||
|
<< endl << endl;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user