mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: add operator[](const word&) as "find-by-name" to some classes
- affected: polyBoundary, fvBoundaryMesh, ZoneMesh, searchableSurfaces
before:
const label zoneI = mesh.cellZones().findZoneID(zoneName);
const cellZone& cz = mesh.cellZones()[zoneI];
after:
const cellZone& cz = mesh.cellZones()[zoneName];
This commit is contained in:
@ -148,8 +148,7 @@ displacementInterpolationFvMotionSolver
|
||||
forAll(faceZoneToTable, i)
|
||||
{
|
||||
const word& zoneName = faceZoneToTable[i][0];
|
||||
label zoneI = fZones.findZoneID(zoneName);
|
||||
const faceZone& fz = fZones[zoneI];
|
||||
const faceZone& fz = fZones[zoneName];
|
||||
|
||||
scalar minCoord = VGREAT;
|
||||
scalar maxCoord = -VGREAT;
|
||||
|
||||
@ -353,8 +353,7 @@ void Foam::displacementLayeredMotionFvMotionSolver::cellZoneSolve
|
||||
const dictionary& faceZoneDict = patchIter().dict();
|
||||
|
||||
// Determine the points of the faceZone within the cellZone
|
||||
label zoneI = mesh().faceZones().findZoneID(faceZoneName);
|
||||
const faceZone& fz = mesh().faceZones()[zoneI];
|
||||
const faceZone& fz = mesh().faceZones()[faceZoneName];
|
||||
const labelList& fzMeshPoints = fz().meshPoints();
|
||||
DynamicList<label> meshPoints(fzMeshPoints.size());
|
||||
forAll(fzMeshPoints, i)
|
||||
|
||||
@ -78,7 +78,7 @@ void Foam::inverseFaceDistanceDiffusivity::correct()
|
||||
|
||||
forAll(patchNames_, i)
|
||||
{
|
||||
label pID = bdry.findPatchID(patchNames_[i]);
|
||||
const label pID = bdry.findPatchID(patchNames_[i]);
|
||||
|
||||
if (pID > -1)
|
||||
{
|
||||
|
||||
@ -78,7 +78,7 @@ void Foam::inversePointDistanceDiffusivity::correct()
|
||||
|
||||
forAll(patchNames_, i)
|
||||
{
|
||||
label pID = bdry.findPatchID(patchNames_[i]);
|
||||
const label pID = bdry.findPatchID(patchNames_[i]);
|
||||
|
||||
if (pID > -1)
|
||||
{
|
||||
|
||||
@ -87,7 +87,7 @@ void surfaceDisplacementPointPatchVectorField::calcProjection
|
||||
{
|
||||
const pointZoneMesh& pZones = mesh.pointZones();
|
||||
|
||||
zonePtr = &pZones[pZones.findZoneID(frozenPointsZone_)];
|
||||
zonePtr = &pZones[frozenPointsZone_];
|
||||
|
||||
Pout<< "surfaceDisplacementPointPatchVectorField : Fixing all "
|
||||
<< zonePtr->size() << " points in pointZone " << zonePtr->name()
|
||||
|
||||
@ -86,7 +86,7 @@ void surfaceSlipDisplacementPointPatchVectorField::calcProjection
|
||||
{
|
||||
const pointZoneMesh& pZones = mesh.pointZones();
|
||||
|
||||
zonePtr = &pZones[pZones.findZoneID(frozenPointsZone_)];
|
||||
zonePtr = &pZones[frozenPointsZone_];
|
||||
|
||||
Pout<< "surfaceSlipDisplacementPointPatchVectorField : Fixing all "
|
||||
<< zonePtr->size() << " points in pointZone " << zonePtr->name()
|
||||
|
||||
Reference in New Issue
Block a user