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
|
||||
);
|
||||
|
||||
instantList masterTimeDirs = runTime.times();
|
||||
|
||||
if (timeDirs.empty())
|
||||
{
|
||||
FatalErrorIn(args.executable())
|
||||
@ -152,6 +150,16 @@ int main(int argc, char *argv[])
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
|
||||
// Get current times if -newTimes
|
||||
instantList masterTimeDirs;
|
||||
if (newTimes)
|
||||
{
|
||||
masterTimeDirs = runTime.times();
|
||||
}
|
||||
|
||||
|
||||
|
||||
# include "createNamedMesh.H"
|
||||
word regionDir = word::null;
|
||||
if (regionName != fvMesh::defaultRegion)
|
||||
@ -176,11 +184,24 @@ int main(int argc, char *argv[])
|
||||
// Loop over all times
|
||||
forAll(timeDirs, timeI)
|
||||
{
|
||||
if (newTimes && findIndex(masterTimeDirs, timeDirs[timeI]) != -1)
|
||||
if (newTimes)
|
||||
{
|
||||
Info<< "Skipping time " << timeDirs[timeI].name()
|
||||
<< endl << endl;
|
||||
continue;
|
||||
// Compare on timeName, not value
|
||||
bool foundTime = false;
|
||||
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