35 Field<T> regionField(cellRegion_().nRegions(),
Zero);
37 forAll(cellRegion_(), celli)
39 regionField[cellRegion_()[celli]] += cellField[celli];
69 label nlb2 = cellRegion_().nRegions()/2;
73 for (label j=0; j<nlb2; j++)
79 - regionField[cellRegion_().nRegions() - j - 1]
85 for (label j=0; j<nlb2; j++)
91 + regionField[cellRegion_().nRegions() - j - 1]
96 regionField.setSize(nlb2);
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
static void listReduce(UList< T > &values, BinaryOp bop, const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm)
Reduce list elements (list must be equal size on all ranks), applying bop to each list element.
Field< T > regionSum(const Field< T > &cellField) const
Sum field per region.
Field< T > collapse(const Field< T > &vsf, const bool asymmetric=false) const
Collapse a field to a line.
static Map< Type > regionSum(const regionSplit ®ions, const Field< Type > &fld)
static constexpr const zero Zero
Global zero (0).
#define forAll(list, i)
Loop across all elements in list.