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)
void reduce(const List< UPstream::commsStruct > &comms, T &value, const BinaryOp &bop, const int tag, const label comm)
Reduce inplace (cf. MPI Allreduce) using specified communication schedule.
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: [].