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:
@ -63,8 +63,7 @@
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
|
||||
const labelList& faces =
|
||||
mesh.faceZones()[magnetZonei];
|
||||
const labelList& faces = mesh.faceZones()[magnetZonei];
|
||||
|
||||
const scalar muri = magnets[i].mur();
|
||||
const scalar Mri = magnets[i].Mr().value();
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
Info << "Reading field p\n" << endl;
|
||||
Info<< "Reading field p\n" << endl;
|
||||
volScalarField p
|
||||
(
|
||||
IOobject
|
||||
@ -12,7 +12,7 @@
|
||||
mesh
|
||||
);
|
||||
|
||||
Info << "Reading field U\n" << endl;
|
||||
Info<< "Reading field U\n" << endl;
|
||||
volVectorField U
|
||||
(
|
||||
IOobject
|
||||
@ -34,7 +34,7 @@
|
||||
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
|
||||
|
||||
|
||||
Info << "Reading field pa\n" << endl;
|
||||
Info<< "Reading field pa\n" << endl;
|
||||
volScalarField pa
|
||||
(
|
||||
IOobject
|
||||
@ -48,7 +48,7 @@
|
||||
mesh
|
||||
);
|
||||
|
||||
Info << "Reading field Ua\n" << endl;
|
||||
Info<< "Reading field Ua\n" << endl;
|
||||
volVectorField Ua
|
||||
(
|
||||
IOobject
|
||||
@ -84,10 +84,8 @@
|
||||
dimensionedScalar lambda(laminarTransport.lookup("lambda"));
|
||||
dimensionedScalar alphaMax(laminarTransport.lookup("alphaMax"));
|
||||
|
||||
const labelList& inletCells =
|
||||
mesh.boundary()[mesh.boundaryMesh().findPatchID("inlet")].faceCells();
|
||||
//const labelList& outletCells =
|
||||
// mesh.boundary()[mesh.boundaryMesh().findPatchID("outlet")].faceCells();
|
||||
const labelList& inletCells = mesh.boundary()["inlet"].faceCells();
|
||||
//const labelList& outletCells = mesh.boundary()["outlet"].faceCells();
|
||||
|
||||
volScalarField alpha
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user