32 void Foam::pressurePIDControlInletVelocityFvPatchVectorField::faceZoneAverage
35 const GeometricField<Type, fvsPatchField, surfaceMesh>& field,
40 const fvMesh&
mesh(patch().boundaryMesh().
mesh());
42 PackedBoolList isMasterFace(syncTools::getInternalOrMasterFaces(
mesh));
44 const faceZone& zone =
mesh.faceZones()[
name];
51 const label f(zone[faceI]);
53 if (
mesh.isInternalFace(
f))
55 const scalar da(
mesh.magSf()[
f]);
60 else if (isMasterFace[
f])
63 const label patchID =
mesh.boundaryMesh().patchID()[bf];
64 const label lf(
mesh.boundaryMesh()[patchID].whichFace(
f));
65 const scalar da(
mesh.magSf().boundaryField()[patchID][lf]);
68 average += da*field.boundaryField()[patchID][lf];
72 reduce(area, sumOp<scalar>());