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:
@ -391,7 +391,7 @@ bool setFaceFieldType
|
||||
}
|
||||
else
|
||||
{
|
||||
label patchi = mesh.boundaryMesh().patchID()[bFacei];
|
||||
const label patchi = mesh.boundaryMesh().patchID()[bFacei];
|
||||
|
||||
allBoundaryValues[bFacei] = fieldValue;
|
||||
++nChanged[patchi];
|
||||
|
||||
Reference in New Issue
Block a user