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:
@ -220,10 +220,7 @@ int main(int argc, char *argv[])
|
||||
# include "createPolyMesh.H"
|
||||
|
||||
const word patchName = args[1];
|
||||
|
||||
label patchI = mesh.boundaryMesh().findPatchID(patchName);
|
||||
|
||||
const polyPatch& patch = mesh.boundaryMesh()[patchI];
|
||||
const polyPatch& patch = mesh.boundaryMesh()[patchName];
|
||||
|
||||
Info<< "Patch:" << patch.name() << endl;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user