From 890313f9d12f37c8543ca2982c7d0e63f2bcb8c6 Mon Sep 17 00:00:00 2001 From: mattijs Date: Mon, 20 Dec 2010 17:12:39 +0000 Subject: [PATCH] ENH: redistributeMeshPar : disable reading of dummy dictionary --- .../redistributeMeshPar/redistributeMeshPar.C | 66 ++++--------------- 1 file changed, 14 insertions(+), 52 deletions(-) diff --git a/applications/utilities/parallelProcessing/redistributeMeshPar/redistributeMeshPar.C b/applications/utilities/parallelProcessing/redistributeMeshPar/redistributeMeshPar.C index f51ebafb87..7bddb26d7c 100644 --- a/applications/utilities/parallelProcessing/redistributeMeshPar/redistributeMeshPar.C +++ b/applications/utilities/parallelProcessing/redistributeMeshPar/redistributeMeshPar.C @@ -86,51 +86,11 @@ autoPtr createMesh if (!haveMesh) { // Create dummy mesh. Only used on procs that don't have mesh. - - { - IOdictionary fvSolution - ( - IOobject - ( - "fvSolution", - runTime.system(), - runTime, - IOobject::NO_READ, - IOobject::NO_WRITE - ) - ); - Pout<< "Writing dummy " << fvSolution.objectPath() << endl; - fvSolution.regIOobject::write(); - } - { - IOdictionary fvSchemes - ( - IOobject - ( - "fvSchemes", - runTime.system(), - runTime, - IOobject::NO_READ, - IOobject::NO_WRITE - ) - ); - fvSchemes.add("divSchemes", dictionary()); - fvSchemes.add("gradSchemes", dictionary()); - fvSchemes.add("laplacianSchemes", dictionary()); - Pout<< "Writing dummy " << fvSchemes.objectPath() << endl; - fvSchemes.regIOobject::write(); - } - - Pout<< "Creating dummy mesh from " << io.objectPath() << endl; + IOobject noReadIO(io); + noReadIO.readOpt() = IOobject::NO_READ; fvMesh dummyMesh ( - IOobject - ( - io.name(), - io.instance(), - io.db(), - IOobject::NO_READ - ), + noReadIO, xferCopy(pointField()), xferCopy(faceList()), xferCopy(labelList()), @@ -521,7 +481,7 @@ void compareFields { if (mag(aBoundary[i] - bBoundary[i]) > tolDim) { - FatalErrorIn + WarningIn ( "compareFields" "(const scalar, const volVectorField&" @@ -532,7 +492,9 @@ void compareFields << " cc:" << endl << " real :" << aBoundary[i] << endl << " mapped :" << bBoundary[i] << endl - << abort(FatalError); + << "This might be just a precision entry" + << " on writing the mesh." << endl; + //<< abort(FatalError); } } } @@ -554,16 +516,16 @@ int main(int argc, char *argv[]) ); # include "setRootCase.H" - // Create processor directory if non-existing - if (!Pstream::master() && !isDir(args.path())) - { - Pout<< "Creating case directory " << args.path() << endl; - mkDir(args.path()); - } + //- Not useful anymore. See above. + //// Create processor directory if non-existing + //if (!Pstream::master() && !isDir(args.path())) + //{ + // Pout<< "Creating case directory " << args.path() << endl; + // mkDir(args.path()); + //} # include "createTime.H" - word regionName = polyMesh::defaultRegion; fileName meshSubDir;