ENH: reconstructParMesh: write cellDist field to 0

This commit is contained in:
mattijs
2013-11-20 16:03:02 +00:00
parent 7dfccf21ad
commit 0adb707ec7

View File

@ -650,7 +650,16 @@ int main(int argc, char *argv[])
<< " for use in manual decomposition." << endl; << " for use in manual decomposition." << endl;
// Write as volScalarField for postprocessing. // Write as volScalarField for postprocessing. Change time to 0
// if was 'constant'
{
const scalar oldTime = runTime.value();
const label oldIndex = runTime.timeIndex();
if (runTime.timeName() == runTime.constant() && oldIndex == 0)
{
runTime.setTime(0, oldIndex+1);
}
volScalarField cellDist volScalarField cellDist
( (
IOobject IOobject
@ -676,6 +685,10 @@ int main(int argc, char *argv[])
Info<< nl << "Wrote decomposition as volScalarField to " Info<< nl << "Wrote decomposition as volScalarField to "
<< cellDist.name() << " for use in postprocessing." << cellDist.name() << " for use in postprocessing."
<< endl; << endl;
// Restore time
runTime.setTime(oldTime, oldIndex);
}
} }
} }