From 4ad45a4789d8a99873d5216a1c3177778597d1b1 Mon Sep 17 00:00:00 2001 From: henry Date: Wed, 2 Sep 2009 11:46:39 +0100 Subject: [PATCH] Changed the time-selection so that it works correctly with the -parallel option for when the time directories only exist in the processor sub-directories. --- .../utilities/preProcessing/mapFields/mapFields.C | 27 +++++++--------------- .../preProcessing/mapFields/setTimeIndex.H | 6 +++++ 2 files changed, 14 insertions(+), 19 deletions(-) diff --git a/applications/utilities/preProcessing/mapFields/mapFields.C b/applications/utilities/preProcessing/mapFields/mapFields.C index fde815d7..111c8719 100644 --- a/applications/utilities/preProcessing/mapFields/mapFields.C +++ b/applications/utilities/preProcessing/mapFields/mapFields.C @@ -228,15 +228,8 @@ wordList addProcessorPatches int main(int argc, char *argv[]) { -# include "setRoots.H" -# include "createTimes.H" -# include "setTimeIndex.H" - - runTimeSource.setTime(sourceTimes[sourceTimeIndex], sourceTimeIndex); - - Info<< "\nSource time: " << runTimeSource.value() - << "\nTarget time: " << runTimeTarget.value() - << endl; + #include "setRoots.H" + #include "createTimes.H" HashTable patchMap; wordList cuttingPatches; @@ -302,11 +295,7 @@ int main(int argc, char *argv[]) caseDirSource/fileName(word("processor") + name(procI)) ); - runTimeSource.setTime - ( - sourceTimes[sourceTimeIndex], - sourceTimeIndex - ); + #include "setTimeIndex.H" fvMesh meshSource ( @@ -348,6 +337,8 @@ int main(int argc, char *argv[]) Info<< "Create source mesh\n" << endl; + #include "setTimeIndex.H" + fvMesh meshSource ( IOobject @@ -450,11 +441,7 @@ int main(int argc, char *argv[]) caseDirSource/fileName(word("processor") + name(procISource)) ); - runTimeSource.setTime - ( - sourceTimes[sourceTimeIndex], - sourceTimeIndex - ); + #include "setTimeIndex.H" fvMesh meshSource ( @@ -529,6 +516,8 @@ int main(int argc, char *argv[]) } else { + #include "setTimeIndex.H" + Info<< "Create meshes\n" << endl; fvMesh meshSource diff --git a/applications/utilities/preProcessing/mapFields/setTimeIndex.H b/applications/utilities/preProcessing/mapFields/setTimeIndex.H index 19efd9ff..80dfb3ef 100644 --- a/applications/utilities/preProcessing/mapFields/setTimeIndex.H +++ b/applications/utilities/preProcessing/mapFields/setTimeIndex.H @@ -23,3 +23,9 @@ runTimeTarget.time().value() ); } + + runTimeSource.setTime(sourceTimes[sourceTimeIndex], sourceTimeIndex); + + Info<< "\nSource time: " << runTimeSource.value() + << "\nTarget time: " << runTimeTarget.value() + << endl; -- 2.11.4.GIT