Skip to content
Snippets Groups Projects
Commit 969af752 authored by mattijs's avatar mattijs
Browse files

ENH: patchToPoly2DMesh: added some checking

parent a4909c94
Branches
Tags
No related merge requests found
......@@ -303,6 +303,33 @@ Foam::patchToPoly2DMesh::~patchToPoly2DMesh()
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();
label startFace = patch_.nInternalEdges();
......
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