paraFoam: add support for system/blockMeshDict with the -block option

Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1803
This commit is contained in:
Henry Weller
2015-08-01 18:36:00 +01:00
parent 00b6400860
commit 75e6691e95
3 changed files with 85 additions and 50 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -43,7 +43,7 @@ License
namespace Foam
{
defineTypeNameAndDebug(vtkPV3blockMesh, 0);
defineTypeNameAndDebug(vtkPV3blockMesh, 0);
}
@ -335,13 +335,28 @@ void Foam::vtkPV3blockMesh::updateFoamMesh()
<< endl;
}
// Set path for the blockMeshDict
const word dictName("blockMeshDict");
fileName dictPath(dbPtr_().system()/dictName);
// Check if dictionary is present in the constant directory
if
(
exists
(
dbPtr_().path()/dbPtr_().constant()
/polyMesh::meshSubDir/dictName
)
)
{
dictPath = dbPtr_().constant()/polyMesh::meshSubDir/dictName;
}
IOdictionary meshDict
(
IOobject
(
"blockMeshDict",
dbPtr_().constant(),
meshDir_,
dictPath,
dbPtr_(),
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE,

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -43,7 +43,7 @@ License
namespace Foam
{
defineTypeNameAndDebug(vtkPV4blockMesh, 0);
defineTypeNameAndDebug(vtkPV4blockMesh, 0);
}
@ -335,13 +335,28 @@ void Foam::vtkPV4blockMesh::updateFoamMesh()
<< endl;
}
// Set path for the blockMeshDict
const word dictName("blockMeshDict");
fileName dictPath(dbPtr_().system()/dictName);
// Check if dictionary is present in the constant directory
if
(
exists
(
dbPtr_().path()/dbPtr_().constant()
/polyMesh::meshSubDir/dictName
)
)
{
dictPath = dbPtr_().constant()/polyMesh::meshSubDir/dictName;
}
IOdictionary meshDict
(
IOobject
(
"blockMeshDict",
dbPtr_().constant(),
meshDir_,
dictPath,
dbPtr_(),
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE,