From 12ee01790182eddc3e63ba369ef1e88d2d7739fa Mon Sep 17 00:00:00 2001
From: Henry Weller <http://cfd.direct>
Date: Thu, 25 Aug 2016 16:42:08 +0100
Subject: [PATCH] polyBoundaryMesh::groupPatchIDs(): Make name clash between
 patch and group name fatal

If this clash is allowed boundary conditions set by wildcards are
processed incorrectly.
---
 .../polyMesh/polyBoundaryMesh/polyBoundaryMesh.C    | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C
index 9b14e03833..5f1a34deda 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C
+++ b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C
@@ -445,14 +445,15 @@ Foam::polyBoundaryMesh::groupPatchIDs() const
 
                 if (findPatchID(name) != -1)
                 {
-                    WarningInFunction
-                        << "Patch " << bm[patchi].name()
-                        << " specifies a group " << name
-                        << " which is also a patch name."
-                        << " This might give problems later on." << endl;
+                    FatalErrorInFunction
+                        << "Patch '" << bm[patchi].name() << '\''
+                        << " specifies the group '" << name << '\''
+                        << " which clashes with a patch name." << nl
+                        << "    Please choose patch names"
+                           " which are not patch type/group names."
+                        << exit(FatalError);
                 }
 
-
                 HashTable<labelList, word>::iterator iter = groupPatchIDs.find
                 (
                     name
-- 
GitLab