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);
Generic templated field type.
static void listCombineAllGather(const List< commsStruct > &comms, List< T > &values, const CombineOp &cop, const int tag, const label comm)
After completion all processors have the same data.
void collapse()
Collapse shape to correct one after removing duplicate vertices.
Field< T > regionSum(const Field< T > &cellField) const
Sum field per region.
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.