Commit 969af752 authored by mattijs's avatar mattijs
Browse files

ENH: patchToPoly2DMesh: added some checking

parent a4909c94
...@@ -303,6 +303,33 @@ Foam::patchToPoly2DMesh::~patchToPoly2DMesh() ...@@ -303,6 +303,33 @@ Foam::patchToPoly2DMesh::~patchToPoly2DMesh()
void Foam::patchToPoly2DMesh::createMesh() void Foam::patchToPoly2DMesh::createMesh()
{ {
for (label edgeI = 0; edgeI < patch_.nInternalEdges(); edgeI++)
{
if (patch_.edgeFaces()[edgeI].size() != 2)
{
FatalErrorIn("patchToPoly2DMesh::patchToPoly2DMesh(..)")
<< "internal edge:" << edgeI
<< " patch.edgeFaces()[edgeI]:" << patch_.edgeFaces()[edgeI]
<< abort(FatalError);
}
}
for
(
label edgeI = patch_.nInternalEdges();
edgeI < patch_.nEdges();
edgeI++
)
{
if (patch_.edgeFaces()[edgeI].size() != 1)
{
FatalErrorIn("patchToPoly2DMesh::patchToPoly2DMesh(..)")
<< "boundary edge:" << edgeI
<< " patch.edgeFaces()[edgeI]:" << patch_.edgeFaces()[edgeI]
<< abort(FatalError);
}
}
createPolyMeshComponents(); createPolyMeshComponents();
label startFace = patch_.nInternalEdges(); label startFace = patch_.nInternalEdges();
......
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