ENH: redistributePar: reconstruct mode in collated. Fixes #2194

This commit is contained in:
mattijs 2021-12-10 15:22:24 +00:00
parent 33b2e0df3d
commit 7da2a5e096
2 changed files with 15 additions and 9 deletions

View File

@ -147,7 +147,7 @@ void createTimeDirs(const fileName& path)
// Just to make sure remove all state and re-scan
fileHandler().flush();
(void)fileHandler().findTimes(path, "constant");
(void)Time::findTimes(path, "constant");
}
@ -2665,9 +2665,11 @@ int main(int argc, char *argv[])
// e.g. latestTime will pick up a different time (which causes createTime.H
// to abort). So for now make sure to have master times on all
// processors
Info<< "Creating time directories on all processors" << nl << endl;
createTimeDirs(args.path());
if (!reconstruct)
{
Info<< "Creating time directories on all processors" << nl << endl;
createTimeDirs(args.path());
}
// Construct time
// ~~~~~~~~~~~~~~
@ -2932,6 +2934,10 @@ int main(int argc, char *argv[])
}
}
// Make sure all is finished writing until re-reading in pass2
// below
fileHandler().flush();
// Pass2 : read mesh and addressing and reconstruct fields
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -27,8 +27,8 @@ cp -f \
if [ "$parallel" = true ]
then
runApplication decomposePar $fileHandler
#runParallel -s decompose redistributePar -decompose $fileHandler
#runApplication decomposePar $fileHandler
runParallel -s decompose redistributePar -decompose $fileHandler
runParallel snappyHexMesh -overwrite $fileHandler
@ -43,10 +43,10 @@ then
## Run reconstructParMesh with collated as well since writes
## constant/polyMesh/cellProcAddressing
runApplication reconstructParMesh -constant $fileHandler
runApplication reconstructPar
#runApplication reconstructParMesh -constant $fileHandler
#runApplication reconstructPar
#runParallel -s reconstruct redistributePar -reconstruct $fileHandler
runParallel -s reconstruct redistributePar -reconstruct $fileHandler
else