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.
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: [].
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.