10 scalar phaseVolume = 0;
12 for (
const label celli : cellLabels)
14 phaseVolume +=
alpha[celli]*V[celli];
17 reduce(phaseVolume, sumOp<scalar>());
20 <<
" phase volume in zone " <<
mesh.cellZones()[czi].name()
21 <<
" = " << phaseVolume*1e6 <<
" ml " <<
endl;
Ostream & endl(Ostream &os)
Add newline and flush stream.
void reduce(T &value, [[maybe_unused]] BinaryOp bop, [[maybe_unused]] const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm)
Reduce inplace (cf. MPI Allreduce)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
const word & name() const noexcept
Return const reference to name.
forAll(mesh.cellZones(), czi)
messageStream Info
Information stream (stdout output on master, null elsewhere)
List< label > labelList
A List of labels.
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].