ENH: blockTopology.C : nice warning message if preservePatchTypes

This commit is contained in:
mattijs
2010-12-03 13:01:46 +00:00
parent dd7f831225
commit c5822f577e

View File

@ -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)