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:
@ -678,17 +678,17 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
const dictionary& dict = patchSources[addedI];
|
||||
|
||||
word patchName(dict.lookup("name"));
|
||||
|
||||
const word patchName(dict.lookup("name"));
|
||||
label destPatchI = patches.findPatchID(patchName);
|
||||
|
||||
if (destPatchI == -1)
|
||||
{
|
||||
FatalErrorIn(args.executable()) << "patch " << patchName
|
||||
<< " not added. Problem." << abort(FatalError);
|
||||
FatalErrorIn(args.executable())
|
||||
<< "patch " << patchName << " not added. Problem."
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
word sourceType(dict.lookup("constructFrom"));
|
||||
const word sourceType(dict.lookup("constructFrom"));
|
||||
|
||||
if (sourceType == "patches")
|
||||
{
|
||||
@ -716,7 +716,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
else if (sourceType == "set")
|
||||
{
|
||||
word setName(dict.lookup("set"));
|
||||
const word setName(dict.lookup("set"));
|
||||
|
||||
faceSet faces(mesh, setName);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user