Commit c23f38ef authored by mattijs's avatar mattijs
Browse files

ENH: polyBoundaryMesh : added check for duplicate patch

parent 7a43ab40
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -673,6 +673,8 @@ bool Foam::polyBoundaryMesh::checkDefinition(const bool report) const
bool hasError = false;
HashSet<word> patchNames(2*size());
forAll(bm, patchI)
{
if (bm[patchI].start() != nextPatchStart && !hasError)
......@@ -689,6 +691,17 @@ bool Foam::polyBoundaryMesh::checkDefinition(const bool report) const
<< " Suppressing future warnings." << endl;
}
if (!patchNames.insert(bm[patchI].name()) && !hasError)
{
hasError = true;
Info<< " ****Duplicate boundary patch " << patchI
<< " named " << bm[patchI].name()
<< " of type " << bm[patchI].type()
<< "." << endl
<< "Suppressing future warnings." << endl;
}
nextPatchStart += bm[patchI].size();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment