mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: face: Revert commit 51db019 and add special test for face of size 1
This commit is contained in:
@ -131,6 +131,10 @@ int main(int argc, char *argv[])
|
|||||||
Info<< "Compare " << face1 << " and " << face1
|
Info<< "Compare " << face1 << " and " << face1
|
||||||
<< " Match = " << face::compare(face1, face1) << endl;
|
<< " 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;
|
Info<< nl << nl << "Zero face" << nl << endl;
|
||||||
|
|
||||||
face fZero;
|
face fZero;
|
||||||
|
|||||||
@ -318,6 +318,17 @@ int Foam::face::compare(const face& a, const face& b)
|
|||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
else if (sizeA == 1)
|
||||||
|
{
|
||||||
|
if (a[0] == b[0])
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const_circulator<face> aCirc(a);
|
const_circulator<face> aCirc(a);
|
||||||
const_circulator<face> bCirc(b);
|
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
|
// If the circulator has stopped then faces a and b do not share a matching
|
||||||
// point. Doesn't work on matching, single element face.
|
// point. Doesn't work on matching, single element face.
|
||||||
//if (!bCirc.circulate())
|
if (!bCirc.circulate())
|
||||||
//{
|
{
|
||||||
// return 0;
|
return 0;
|
||||||
//}
|
}
|
||||||
|
|
||||||
// Look forwards around the faces for a match
|
// Look forwards around the faces for a match
|
||||||
do
|
do
|
||||||
|
|||||||
Reference in New Issue
Block a user