Skip to content
Snippets Groups Projects
Commit 75a42676 authored by laurence's avatar laurence
Browse files

BUG: face: Revert commit 51db019b and add special test for face of size 1

parent 52c32378
Branches
Tags
No related merge requests found
......@@ -131,6 +131,10 @@ int main(int argc, char *argv[])
Info<< "Compare " << face1 << " and " << face1
<< " Match = " << face::compare(face1, face1) << endl;
face face2(identity(1)+1);
Info<< "Compare " << face1 << " and " << face2
<< " Match = " << face::compare(face1, face2) << endl;
Info<< nl << nl << "Zero face" << nl << endl;
face fZero;
......
......@@ -318,6 +318,17 @@ int Foam::face::compare(const face& a, const face& b)
{
return 0;
}
else if (sizeA == 1)
{
if (a[0] == b[0])
{
return 1;
}
else
{
return 0;
}
}
const_circulator<face> aCirc(a);
const_circulator<face> bCirc(b);
......@@ -338,10 +349,10 @@ int Foam::face::compare(const face& a, const face& b)
// If the circulator has stopped then faces a and b do not share a matching
// point. Doesn't work on matching, single element face.
//if (!bCirc.circulate())
//{
// return 0;
//}
if (!bCirc.circulate())
{
return 0;
}
// Look forwards around the faces for a match
do
......
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