From c5822f577e66da031ea00afd2a42c2d20a52b044 Mon Sep 17 00:00:00 2001 From: mattijs Date: Fri, 3 Dec 2010 13:01:46 +0000 Subject: [PATCH] ENH: blockTopology.C : nice warning message if preservePatchTypes --- .../blockMesh/blockMesh/blockMeshTopology.C | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/mesh/blockMesh/blockMesh/blockMeshTopology.C b/src/mesh/blockMesh/blockMesh/blockMeshTopology.C index ec995aa9fc..52f3439dc8 100644 --- a/src/mesh/blockMesh/blockMesh/blockMeshTopology.C +++ b/src/mesh/blockMesh/blockMesh/blockMeshTopology.C @@ -504,7 +504,22 @@ Foam::polyMesh* Foam::blockMesh::createTopology dictionary& dict = patchDicts[patchI]; // Add but not override type - dict.add("type", patchTypes[patchI], false); + if (!dict.found("type")) + { + dict.add("type", patchTypes[patchI], false); + } + else if (word(dict.lookup("type")) != patchTypes[patchI]) + { + IOWarningIn + ( + "blockMesh::createTopology(IOdictionary&)", + meshDescription + ) << "For patch " << patchNames[patchI] + << " overriding type '" << patchTypes[patchI] + << "' with '" << word(dict.lookup("type")) + << "' (read from boundary file)" + << endl; + } // Override neighbourpatch name if (nbrPatchNames[patchI] != word::null)