From 7343b3853c269e96373f1f674b76c64126de014c Mon Sep 17 00:00:00 2001 From: andy Date: Wed, 23 Jul 2008 11:12:30 +0100 Subject: [PATCH 1/2] very minor formatting --- .../preProcessing/applyBoundaryLayer/applyBoundaryLayer.C | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C b/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C index e2a8a9c5ab..06b9e6c884 100644 --- a/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C +++ b/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C @@ -95,8 +95,8 @@ int main(int argc, char *argv[]) << exit(FatalError); } - Info<< "\nCreating boundary-layer for U of thickness" << ybl.value() << " m" - << nl << endl; + Info<< "\nCreating boundary-layer for U of thickness " + << ybl.value() << " m" << nl << endl; // Modify velocity by applying a 1/7th power law boundary-layer // u/U0 = (y/ybl)^(1/7) From 5508e0b6cba69ec240cd71aadb54029128f4b765 Mon Sep 17 00:00:00 2001 From: andy Date: Wed, 23 Jul 2008 17:47:26 +0100 Subject: [PATCH 2/2] added -dict option --- .../mesh/generation/blockMesh/addOptions.H | 1 + .../mesh/generation/blockMesh/blockMeshApp.C | 21 ++++++++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/applications/utilities/mesh/generation/blockMesh/addOptions.H b/applications/utilities/mesh/generation/blockMesh/addOptions.H index a0f494e483..c9e07df5a6 100644 --- a/applications/utilities/mesh/generation/blockMesh/addOptions.H +++ b/applications/utilities/mesh/generation/blockMesh/addOptions.H @@ -1,3 +1,4 @@ argList::noParallel(); argList::validOptions.insert("blockTopology", ""); + argList::validOptions.insert("dict", "dictionary"); # include "addRegionOption.H" diff --git a/applications/utilities/mesh/generation/blockMesh/blockMeshApp.C b/applications/utilities/mesh/generation/blockMesh/blockMeshApp.C index c13d906392..e337b0d167 100644 --- a/applications/utilities/mesh/generation/blockMesh/blockMeshApp.C +++ b/applications/utilities/mesh/generation/blockMesh/blockMeshApp.C @@ -77,11 +77,21 @@ int main(int argc, char *argv[]) Info<< nl << "Reading block mesh description dictionary" << endl; + word dictName("blockMeshDict"); + fileName dictPath(runTime.constant()/polyMeshDir); + + if (args.options().found("dict")) + { + fileName userDict(args.options()["dict"]); + + dictName = userDict.name(); + dictPath = userDict.path(); + } + IOobject meshDescriptionIOobject ( - "blockMeshDict", - runTime.constant(), - polyMeshDir, + dictName, + dictPath, runTime, IOobject::MUST_READ, IOobject::NO_WRITE, @@ -91,13 +101,14 @@ int main(int argc, char *argv[]) if (!meshDescriptionIOobject.headerOk()) { FatalErrorIn(args.executable()) - << "Cannot open mesh description file " << nl - << runTime.constant()/polyMeshDir/"blockMeshDict" << nl + << "Cannot open mesh description file: " << nl + << dictPath/dictName << nl << exit(FatalError); } IOdictionary meshDescription(meshDescriptionIOobject); + Info<< nl << "Creating block mesh" << endl; blockMesh blocks(meshDescription);