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:
@ -85,12 +85,12 @@ label findEdge(const primitiveMesh& mesh, const label v0, const label v1)
|
||||
// Checks whether patch present
|
||||
void checkPatch(const polyBoundaryMesh& bMesh, const word& name)
|
||||
{
|
||||
label patchI = bMesh.findPatchID(name);
|
||||
const label patchI = bMesh.findPatchID(name);
|
||||
|
||||
if (patchI == -1)
|
||||
{
|
||||
FatalErrorIn("checkPatch(const polyBoundaryMesh&, const word&)")
|
||||
<< "Cannot find patch " << name << endl
|
||||
<< "Cannot find patch " << name << nl
|
||||
<< "It should be present but of zero size" << endl
|
||||
<< "Valid patches are " << bMesh.names()
|
||||
<< exit(FatalError);
|
||||
|
||||
Reference in New Issue
Block a user