Go to the documentation of this file.
57 const label nProcGroup
60 label jump = processorGroup.
size()/nProcGroup;
61 label jumpb = jump + 1;
62 label fstProcessorGroup = processorGroup.
size() - jump*nProcGroup;
69 for (j=0; j<fstProcessorGroup; j++)
73 processorGroup[ind++] = j;
78 for (; j<nProcGroup; j++)
82 processorGroup[ind++] = j;
91 const label nProcGroup,
94 const scalar summedWeights
107 const scalar jump = summedWeights/nProcGroup;
108 const label nProcGroupM1 = nProcGroup - 1;
109 scalar sumWeights = 0;
114 for (j=0; j<nProcGroupM1; j++)
116 const scalar
limit = jump*scalar(j + 1);
117 while (sumWeights <
limit)
119 sumWeights += weights[indices[ind]];
120 processorGroup[ind++] = j;
124 while (ind < processorGroup.
size())
126 processorGroup[ind++] = nProcGroupM1;
160 assignToProcessorGroup(processorGroups, n_.x());
164 finalDecomp[pointIndices[i]] = processorGroups[i];
176 assignToProcessorGroup(processorGroups, n_.y());
180 finalDecomp[pointIndices[i]] += n_.x()*processorGroups[i];
192 assignToProcessorGroup(processorGroups, n_.z());
196 finalDecomp[pointIndices[i]] += n_.x()*n_.y()*processorGroups[i];
233 const scalar summedWeights =
sum(weights);
234 assignToProcessorGroup
245 finalDecomp[pointIndices[i]] = processorGroups[i];
257 assignToProcessorGroup
268 finalDecomp[pointIndices[i]] += n_.x()*processorGroups[i];
280 assignToProcessorGroup
291 finalDecomp[pointIndices[i]] += n_.x()*n_.y()*processorGroups[i];
315 return decomposeOneProc(
points);
326 label nTotalPoints = 0;
329 nTotalPoints +=
points.size();
342 nTotalPoints += nbrPoints.size();
352 toSlave << SubField<label>
356 globalNumbers.
offset(slave)
390 return decomposeOneProc(
points, weights);
402 label nTotalPoints = 0;
406 nTotalPoints +=
points.size();
425 ).assign(nbrWeights);
426 nTotalPoints += nbrPoints.size();
436 toSlave << SubField<label>
440 globalNumbers.
offset(slave)
453 toMaster<<
points << weights;
simpleGeomDecomp(const simpleGeomDecomp &)
labelList decomposeOneProc(const pointField &points) const
#define forAll(list, i)
Loop across all elements in list.
Output inter-processor communications stream.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
static label nProcs(const label communicator=0)
Number of processes in parallel run.
void assignToProcessorGroup(labelList &, const label) const
static bool & parRun()
Is this a parallel run?
label localSize() const
My local size.
Geometrical domain decomposition.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
label offset(const label procI) const
Start of procI data.
static int masterNo()
Process index of the master.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Macros for easy insertion into run-time selection tables.
void limit(const RdeltaTType &rDeltaT, const RhoType &rho, const volScalarField &psi, const surfaceScalarField &phi, surfaceScalarField &phiPsi, const SpType &Sp, const SuType &Su, const scalar psiMax, const scalar psiMin, const bool returnCorr)
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
tmp< Field< cmptType > > component(const direction) const
Return a component field of the field.
Less function class that can be used for sorting.
static bool master(const label communicator=0)
Am I the master process.
void setSize(const label)
Reset size of List.
label size() const
Global sum of localSizes.
virtual labelList decompose(const pointField &)
Like decompose but with uniform weights on the points.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
label k
Boltzmann constant.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
Input inter-processor communications stream.
void size(const label)
Override size to be inconsistent with allocated storage.
defineTypeNameAndDebug(combustionModel, 0)
PtrList< volScalarField > & Y