mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'cvm' of ssh://hunt//home/noisy3/OpenFOAM/OpenFOAM-dev into cvm
This commit is contained in:
@ -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) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -102,7 +102,7 @@ Foam::labelList Foam::orientedSurface::edgeToFace
|
|||||||
{
|
{
|
||||||
if (flip[face1] == UNVISITED)
|
if (flip[face1] == UNVISITED)
|
||||||
{
|
{
|
||||||
FatalErrorIn("orientedSurface::edgeToFace") << "Problem"
|
FatalErrorIn("orientedSurface::edgeToFace(..)") << "Problem"
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -283,8 +283,10 @@ bool Foam::orientedSurface::flipSurface
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Recalculate normals
|
// Recalculate normals
|
||||||
|
if (hasFlipped)
|
||||||
|
{
|
||||||
s.clearOut();
|
s.clearOut();
|
||||||
|
}
|
||||||
return hasFlipped;
|
return hasFlipped;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -352,8 +354,28 @@ bool Foam::orientedSurface::orient
|
|||||||
// FLIP: need to flip
|
// FLIP: need to flip
|
||||||
labelList flipState(s.size(), UNVISITED);
|
labelList flipState(s.size(), UNVISITED);
|
||||||
|
|
||||||
flipState[0] = NOFLIP;
|
label faceI = 0;
|
||||||
walkSurface(s, 0, flipState);
|
while (true)
|
||||||
|
{
|
||||||
|
label startFaceI = -1;
|
||||||
|
while (faceI < s.size())
|
||||||
|
{
|
||||||
|
if (flipState[faceI] == UNVISITED)
|
||||||
|
{
|
||||||
|
startFaceI = faceI;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
faceI++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (startFaceI == -1)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
flipState[startFaceI] = NOFLIP;
|
||||||
|
walkSurface(s, startFaceI, flipState);
|
||||||
|
}
|
||||||
|
|
||||||
anyFlipped = flipSurface(s, flipState);
|
anyFlipped = flipSurface(s, flipState);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user