62 void Foam::simpleGeomDecomp::assignToProcessorGroup
65 const label nProcGroup
68 label jump = processorGroup.size()/nProcGroup;
69 label jumpb = jump + 1;
70 label fstProcessorGroup = processorGroup.size() - jump*nProcGroup;
77 for (j=0; j<fstProcessorGroup; j++)
81 processorGroup[ind++] = j;
86 for (; j<nProcGroup; j++)
90 processorGroup[ind++] = j;
96 void Foam::simpleGeomDecomp::assignToProcessorGroup
99 const label nProcGroup,
102 const scalar summedWeights
115 const scalar jump = summedWeights/nProcGroup;
116 const label nProcGroupM1 = nProcGroup - 1;
117 scalar sumWeights = 0;
122 for (j=0; j<nProcGroupM1; j++)
124 const scalar limit = jump*scalar(j + 1);
125 while (sumWeights < limit)
127 sumWeights += weights[indices[ind]];
128 processorGroup[ind++] = j;
132 while (ind < processorGroup.size())
134 processorGroup[ind++] = nProcGroupM1;
147 labelList processorGroups(points.size());
155 const pointField rotatedPoints(rotDelta_ & points);
168 assignToProcessorGroup(processorGroups, n_.x());
172 finalDecomp[pointIndices[i]] = processorGroups[i];
184 assignToProcessorGroup(processorGroups, n_.y());
188 finalDecomp[pointIndices[i]] += n_.x()*processorGroups[i];
200 assignToProcessorGroup(processorGroups, n_.z());
204 finalDecomp[pointIndices[i]] += n_.x()*n_.y()*processorGroups[i];
220 labelList processorGroups(points.size());
228 const pointField rotatedPoints(rotDelta_ & points);
241 const scalar summedWeights =
sum(weights);
242 assignToProcessorGroup
253 finalDecomp[pointIndices[i]] = processorGroups[i];
265 assignToProcessorGroup
276 finalDecomp[pointIndices[i]] += n_.x()*processorGroups[i];
288 assignToProcessorGroup
299 finalDecomp[pointIndices[i]] += n_.x()*n_.y()*processorGroups[i];
323 return decomposeOneProc(points);
334 label nTotalPoints = 0;
337 nTotalPoints += points.
size();
350 nTotalPoints += nbrPoints.
size();
354 labelList finalDecomp(decomposeOneProc(allPoints));
360 toSlave << SubField<label>
363 globalNumbers.localSize(slave),
364 globalNumbers.offset(slave)
406 return decomposeOneProc(points, weights);
418 label nTotalPoints = 0;
422 nTotalPoints += points.
size();
442 nTotalPoints += nbrPoints.
size();
446 labelList finalDecomp(decomposeOneProc(allPoints, allWeights));
452 toSlave << SubField<label>
455 globalNumbers.localSize(slave),
456 globalNumbers.offset(slave)
473 toMaster<< points << weights;
#define forAll(list, i)
Loop across all elements in list.
FvWallInfoData< WallInfo, label > label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
static int masterNo()
Process index of the master.
A list of keyword definitions, which are a keyword followed by any number of values (e...
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void size(const label)
Override size to be inconsistent with allocated storage.
static bool master(const label communicator=0)
Am I the master process.
label k
Boltzmann constant.
Pre-declare related SubField type.
static bool less(const vector &x, const vector &y)
To compare normals.
Macros for easy insertion into run-time selection tables.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
Input inter-processor communications stream.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
vectorField pointField
pointField is a vectorField.
Geometrical domain decomposition.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
List< label > labelList
A List of labels.
virtual labelList decompose(const pointField &)
Like decompose but with uniform weights on the points.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)
Output inter-processor communications stream.
void setSize(const label)
Reset size of List.
static bool & parRun()
Is this a parallel run?
static label nProcs(const label communicator=0)
Number of processes in parallel run.
simpleGeomDecomp(const dictionary &decompositionDict)
Construct given the decomposition dictionary.