34void Foam::pressurePIDControlInletVelocityFvPatchVectorField::faceZoneAverage
37 const GeometricField<Type, fvsPatchField, surfaceMesh>&
field,
42 const fvMesh&
mesh =
patch().boundaryMesh().mesh();
43 const auto&
pbm =
mesh.boundaryMesh();
47 const faceZone& zone =
mesh.faceZones()[
name];
52 for (
const label meshFacei : zone)
54 if (
mesh.isInternalFace(meshFacei))
56 const scalar da =
mesh.magSf()[meshFacei];
61 else if (isMasterFace[meshFacei])
63 const label patchi =
pbm.patchID(meshFacei);
64 const label patchFacei =
pbm[patchi].whichFace(meshFacei);
65 const scalar da =
mesh.magSf().boundaryField()[patchi][patchFacei];
72 reduce(area, sumOp<scalar>());
const polyBoundaryMesh & pbm
const wordList area
Standard area field types (scalar, vector, tensor, etc).
const std::string patch
OpenFOAM patch number as a std::string.
void reduce(T &value, BinaryOp bop, const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm)
Reduce inplace (cf. MPI Allreduce).
static constexpr const zero Zero
Global zero (0).
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &f1, const label comm)