34 void 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];
const polyBoundaryMesh & pbm
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &f1)
tmp< GeometricField< Type, faPatchField, areaMesh > > average(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
Area-weighted average a edgeField creating a areaField.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
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, const BinaryOp &bop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
Reduce inplace (cf. MPI Allreduce) using linear/tree communication schedule.
static constexpr const zero Zero
Global zero (0)