Skip to content
Snippets Groups Projects
Commit 08d78d47 authored by Henry Weller's avatar Henry Weller
Browse files

blockMesh: Added checks for duplicate and unmatched curved-faces

parent d2b96d88
Branches
Tags
No related merge requests found
......@@ -56,9 +56,9 @@ void Foam::blockMesh::check(const polyMesh& bm) const
{
bool found = false;
forAll(edges, ci)
forAll(edges, ei)
{
found = edges_[cei].compare(edges[ci][0], edges[ci][1]) != 0;
found = edges_[cei].compare(edges[ei][0], edges[ei][1]) != 0;
if (found) break;
}
......@@ -71,8 +71,45 @@ void Foam::blockMesh::check(const polyMesh& bm) const
}
}
const pointField& points = bm.points();
const faceList& faces = bm.faces();
// Check for duplicate curved face definitions
forAll(faces_, cfi)
{
for (label cfj=cfi+1; cfj<faces_.size(); cfj++)
{
if (faces_[cfi].compare(faces_[cfj]) != 0)
{
Info<< " Curved face " << faces_[cfj]
<< " is a duplicate of curved face " << faces_[cfi]
<< endl;
ok = false;
break;
}
}
}
// Check curved-face/block-face correspondence
forAll(faces_, cfi)
{
bool found = false;
forAll(faces, fi)
{
found = faces_[cfi].compare(faces[fi]) != 0;
if (found) break;
}
if (!found)
{
Info<< " Curved face " << faces_[cfi]
<< " does not correspond to a block face."
<< endl;
ok = false;
}
}
const pointField& points = bm.points();
const cellList& cells = bm.cells();
const polyPatchList& patches = bm.boundaryMesh();
......
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