mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
face: Add handling for duplicate vertices in sameVertices
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1821
This commit is contained in:
@ -427,18 +427,22 @@ bool Foam::face::sameVertices(const face& a, const face& b)
|
|||||||
|
|
||||||
forAll(a, i)
|
forAll(a, i)
|
||||||
{
|
{
|
||||||
bool found = false;
|
// Count occurrences of a[i] in a
|
||||||
|
label aOcc = 0;
|
||||||
forAll(b, j)
|
forAll(a, j)
|
||||||
{
|
{
|
||||||
if (a[i] == b[j])
|
if (a[i] == a[j]) aOcc++;
|
||||||
{
|
|
||||||
found = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!found) return false;
|
// Count occurrences of a[i] in b
|
||||||
|
label bOcc = 0;
|
||||||
|
forAll(b, j)
|
||||||
|
{
|
||||||
|
if (a[i] == b[j]) bOcc++;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if occurrences of a[i] in a and b are the same
|
||||||
|
if (aOcc != bOcc) return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -27,7 +27,6 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
// Check the blockMesh topology
|
|
||||||
void Foam::blockMesh::checkBlockMesh(const polyMesh& bm) const
|
void Foam::blockMesh::checkBlockMesh(const polyMesh& bm) const
|
||||||
{
|
{
|
||||||
if (verboseOutput)
|
if (verboseOutput)
|
||||||
|
|||||||
Reference in New Issue
Block a user