33 Field<T> regionField(cellRegion_().nRegions(),
Zero);
35 forAll(cellRegion_(), celli)
37 regionField[cellRegion_()[celli]] += cellField[celli];
51 const Field<T>& cellField,
56 const Field<T> summedField(
regionSum(cellField));
68 label nlb2 = cellRegion_().nRegions()/2;
72 for (
label j=0; j<nlb2; j++)
78 - regionField[cellRegion_().nRegions() - j - 1]
84 for (
label j=0; j<nlb2; j++)
90 + regionField[cellRegion_().nRegions() - j - 1]
95 regionField.setSize(nlb2);
static void listCombineScatter(const List< commsStruct > &comms, List< T > &Value, const int tag, const label comm)
Scatter data. Reverse of combineGather.
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
static void listCombineGather(const List< commsStruct > &comms, List< T > &Value, const CombineOp &cop, const int tag, const label comm)
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.