mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: added polyBoundaryMesh patchID(meshFacei) method
- this complements the whichPatch(meshFacei) method [binary search]
and the list of patchID() by adding internal range checks.
eg,
Before
~~~~~~
if (facei >= mesh.nInternalFaces() && facei < mesh.nFaces())
{
patchi = pbm.patchID()[facei - mesh.nInternalFaces()];
...
}
After
~~~~~
patchi = pbm.patchID(facei);
if (patchi >= 0)
{
...
}
This commit is contained in:
@ -106,11 +106,10 @@ void ReadAndMapFields
|
||||
}
|
||||
else if (index < 0)
|
||||
{
|
||||
label facei = -index-1;
|
||||
label bFacei = facei - mesh.nInternalFaces();
|
||||
if (bFacei >= 0)
|
||||
const label facei = -index-1;
|
||||
const label patchi = mesh.boundaryMesh().patchID(facei);
|
||||
if (patchi >= 0)
|
||||
{
|
||||
label patchi = mesh.boundaryMesh().patchID()[bFacei];
|
||||
label localFacei = mesh.boundaryMesh()[patchi].whichFace
|
||||
(
|
||||
facei
|
||||
|
||||
Reference in New Issue
Block a user