diff --git a/applications/utilities/preProcessing/mapFields/mapFields.C b/applications/utilities/preProcessing/mapFields/mapFields.C index fde815d76f..111c871958 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 19efd9ff5b..80dfb3efca 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;