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:
Mark Olesen
2010-04-29 10:12:35 +02:00
parent 845314b280
commit 72f7d46f23
46 changed files with 438 additions and 258 deletions

View File

@ -161,7 +161,7 @@ void Foam::fieldValues::faceSource::setFaceZoneFaces()
void Foam::fieldValues::faceSource::setPatchFaces()
{
label patchId = mesh().boundaryMesh().findPatchID(sourceName_);
const label patchId = mesh().boundaryMesh().findPatchID(sourceName_);
if (patchId < 0)
{