35 Field<T> regionField(cellRegion_().nRegions(),
Zero);
37 forAll(cellRegion_(), celli)
39 regionField[cellRegion_()[celli]] += cellField[celli];
52 const Field<T>& cellField,
57 const Field<T> summedField(
regionSum(cellField));
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);
#define forAll(list, i)
Loop across all elements in list.
Field< T > regionSum(const Field< T > &cellField) const
Sum field per region.
static Map< Type > regionSum(const regionSplit ®ions, const Field< Type > &fld)
Field< T > collapse(const Field< T > &vsf, const bool asymmetric=false) const
Collapse a field to a line.
static void listCombineReduce(List< T > &values, const CombineOp &cop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
After completion all processors have the same data.
static constexpr const zero Zero
Global zero (0)