From 4e0fdc69ea03618960004b286639ba02d51b49aa Mon Sep 17 00:00:00 2001 From: mattijs Date: Fri, 30 Apr 2010 11:16:57 +0100 Subject: [PATCH] BUG: createPatch was reading mesh before setting matchTol so could not correct illegal mesh --- .../mesh/manipulation/createPatch/createPatch.C | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/applications/utilities/mesh/manipulation/createPatch/createPatch.C b/applications/utilities/mesh/manipulation/createPatch/createPatch.C index 1cd681b5f5..5e186a6d0a 100644 --- a/applications/utilities/mesh/manipulation/createPatch/createPatch.C +++ b/applications/utilities/mesh/manipulation/createPatch/createPatch.C @@ -521,7 +521,9 @@ int main(int argc, char *argv[]) # include "setRootCase.H" # include "createTime.H" runTime.functionObjects().off(); -# include "createNamedPolyMesh.H" + + Foam::word meshRegionName = polyMesh::defaultRegion; + args.optionReadIfPresent("region", meshRegionName); const bool overwrite = args.optionFound("overwrite"); @@ -534,8 +536,8 @@ int main(int argc, char *argv[]) "createPatchDict", runTime.system(), ( - regionName != polyMesh::defaultRegion - ? regionName + meshRegionName != polyMesh::defaultRegion + ? meshRegionName : word::null ), runTime, @@ -556,6 +558,7 @@ int main(int argc, char *argv[]) << " to match up faces and points" << nl << endl; coupledPolyPatch::matchTol = tol; +# include "createNamedPolyMesh.H" const word oldInstance = mesh.pointsInstance();