mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: redistributeMeshPar : disable reading of dummy dictionary
This commit is contained in:
@ -86,51 +86,11 @@ autoPtr<fvMesh> createMesh
|
|||||||
if (!haveMesh)
|
if (!haveMesh)
|
||||||
{
|
{
|
||||||
// Create dummy mesh. Only used on procs that don't have mesh.
|
// Create dummy mesh. Only used on procs that don't have mesh.
|
||||||
|
IOobject noReadIO(io);
|
||||||
{
|
noReadIO.readOpt() = IOobject::NO_READ;
|
||||||
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;
|
|
||||||
fvMesh dummyMesh
|
fvMesh dummyMesh
|
||||||
(
|
(
|
||||||
IOobject
|
noReadIO,
|
||||||
(
|
|
||||||
io.name(),
|
|
||||||
io.instance(),
|
|
||||||
io.db(),
|
|
||||||
IOobject::NO_READ
|
|
||||||
),
|
|
||||||
xferCopy(pointField()),
|
xferCopy(pointField()),
|
||||||
xferCopy(faceList()),
|
xferCopy(faceList()),
|
||||||
xferCopy(labelList()),
|
xferCopy(labelList()),
|
||||||
@ -521,7 +481,7 @@ void compareFields
|
|||||||
{
|
{
|
||||||
if (mag(aBoundary[i] - bBoundary[i]) > tolDim)
|
if (mag(aBoundary[i] - bBoundary[i]) > tolDim)
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
WarningIn
|
||||||
(
|
(
|
||||||
"compareFields"
|
"compareFields"
|
||||||
"(const scalar, const volVectorField&"
|
"(const scalar, const volVectorField&"
|
||||||
@ -532,7 +492,9 @@ void compareFields
|
|||||||
<< " cc:" << endl
|
<< " cc:" << endl
|
||||||
<< " real :" << aBoundary[i] << endl
|
<< " real :" << aBoundary[i] << endl
|
||||||
<< " mapped :" << bBoundary[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"
|
# include "setRootCase.H"
|
||||||
|
|
||||||
// Create processor directory if non-existing
|
//- Not useful anymore. See above.
|
||||||
if (!Pstream::master() && !isDir(args.path()))
|
//// Create processor directory if non-existing
|
||||||
{
|
//if (!Pstream::master() && !isDir(args.path()))
|
||||||
Pout<< "Creating case directory " << args.path() << endl;
|
//{
|
||||||
mkDir(args.path());
|
// Pout<< "Creating case directory " << args.path() << endl;
|
||||||
}
|
// mkDir(args.path());
|
||||||
|
//}
|
||||||
|
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
|
|
||||||
|
|
||||||
word regionName = polyMesh::defaultRegion;
|
word regionName = polyMesh::defaultRegion;
|
||||||
fileName meshSubDir;
|
fileName meshSubDir;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user