Moved setFaceInfo into meshTools namespace

This commit is contained in:
Vuko Vukcevic 2018-01-17 10:49:54 +01:00
parent b767b8aba6
commit d8e258038c
2 changed files with 44 additions and 1 deletions

View file

@ -26,6 +26,7 @@ License
#include "meshTools.H"
#include "polyMesh.H"
#include "hexMatcher.H"
#include "faceZone.H"
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
@ -897,4 +898,33 @@ Foam::label Foam::meshTools::cutDirToEdge
}
void Foam::meshTools::setFaceInfo
(
const polyMesh& mesh,
const label faceI,
label& patchID,
label& zoneID,
label& zoneFlip
)
{
patchID = -1;
if (!mesh.isInternalFace(faceI))
{
patchID = mesh.boundaryMesh().whichPatch(faceI);
}
zoneID = mesh.faceZones().whichZone(faceI);
zoneFlip = false;
if (zoneID > -1)
{
const faceZone& fZone = mesh.faceZones()[zoneID];
zoneFlip = fZone.flipMap()[fZone.whichFace(faceI)];
}
}
// ************************************************************************* //

View file

@ -274,7 +274,7 @@ namespace meshTools
);
// Hex only functionality.
// Hex only functionality
//- Given edge on hex find other 'parallel', non-connected edges.
void getParallelEdges
@ -305,6 +305,19 @@ namespace meshTools
const vector& cutDir
);
// Face information
//- Set face information: patch, zone and zone flip for a face
void setFaceInfo
(
const polyMesh& mesh,
const label faceI,
label& patchID,
label& zoneID,
label& zoneFlip
);
} // End namespace meshTools