From d8638da06fba7c7519c5f0dbcbad407d2f96f98e Mon Sep 17 00:00:00 2001
From: mattijs <m.janssens@opencfd.co.uk>
Date: Tue, 29 Jul 2008 11:50:18 +0100
Subject: [PATCH] set number of patches before changing faces

---
 .../utilities/mesh/manipulation/mergeMeshes/mergePolyMesh.C | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/applications/utilities/mesh/manipulation/mergeMeshes/mergePolyMesh.C b/applications/utilities/mesh/manipulation/mergeMeshes/mergePolyMesh.C
index 0335cf3abc6..bcd1c5c9ce3 100644
--- a/applications/utilities/mesh/manipulation/mergeMeshes/mergePolyMesh.C
+++ b/applications/utilities/mesh/manipulation/mergeMeshes/mergePolyMesh.C
@@ -275,6 +275,12 @@ void Foam::mergePolyMesh::addMesh(const polyMesh& m)
         patchIndices[patchI] = patchIndex(bm[patchI]);
     }
 
+    // Temporary: update number of allowable patches. This should be
+    // determined at the top - before adding anything.
+    meshMod_.setNumPatches(patchNames_.size());
+
+
+
     const faceZoneMesh& fz = m.faceZones();
     labelList faceZoneIndices(fz.size());
 
-- 
GitLab