Go to the documentation of this file.
90 cutConnections.
setSize(nDomains);
93 forAll(subCellCells, subCellI)
95 labelList& cCells = subCellCells[subCellI];
102 label nbrCellI = oldToNew[cCells[i]];
105 cutConnections[allDist[cCells[i]]]++;
112 label cellI = set[subCellI];
113 label oldNbrCellI = cellCells[cellI][i];
117 cCells[newI++] = globalSubCells.
toGlobal(procI, nbrCellI);
138 methods_[levelI].decompose
148 label orig = pointMap[i];
149 finalDecomp[orig] += dist[i];
152 if (levelI != methods_.size()-1)
157 label n = methods_[levelI].nDomains();
161 finalDecomp *= methods_[levelI+1].nDomains();
164 if (debug && Pstream::master())
166 Pout<<
"Decomposition at level " << levelI <<
" :" <<
endl;
169 for (
label domainI = 0; domainI <
n; domainI++)
176 scalarField subWeights(pointWeights, domainPoints);
181 subsetGlobalCellCells
196 Pstream::listCombineScatter(nOutsideConnections);
199 forAll(nOutsideConnections, i)
201 if (nOutsideConnections[i] > 0)
204 nFaces += nOutsideConnections[i];
209 if (debug && Pstream::master())
211 Pout<<
" Domain " << domainI <<
nl
212 <<
" Number of cells = " <<
nPoints <<
nl
213 <<
" Number of inter-domain patches = " <<
nPatches
215 <<
" Number of inter-domain faces = " << nFaces <<
nl
231 if (debug && Pstream::master())
241 label nNext = methods_[levelI+1].nDomains();
245 dictionary::const_iterator iter =
246 decompositionDict_.subDict(typeName +
"Coeffs").begin();
248 myDict.
set(
"numberOfSubdomains", nTotal);
250 if (debug && Pstream::master())
252 Pout<<
"Reference decomposition with " << myDict <<
" :"
270 for (
label blockI = 0; blockI <
n; blockI++)
276 forAll(pointPoints, pointI)
278 if ((dist[pointI] / nNext) == blockI)
282 const labelList& pPoints = pointPoints[pointI];
286 label distBlockI = dist[pPoints[i]] / nNext;
287 if (distBlockI != blockI)
289 nOutsideConnections[distBlockI]++;
296 Pstream::listCombineGather
301 Pstream::listCombineScatter(nOutsideConnections);
304 forAll(nOutsideConnections, i)
306 if (nOutsideConnections[i] > 0)
309 nFaces += nOutsideConnections[i];
313 if (debug && Pstream::master())
315 Pout<<
" Domain " << blockI <<
nl
316 <<
" Number of cells = " <<
nPoints <<
nl
317 <<
" Number of inter-domain patches = "
319 <<
" Number of inter-domain faces = " << nFaces
333 methodsDict_(decompositionDict_.subDict(typeName +
"Coeffs"))
343 Info<<
"decompositionMethod " <<
type() <<
" :" <<
endl;
346 Info<<
" level " << i <<
" decomposing with " <<
methods_[i].type()
347 <<
" into " <<
methods_[i].nDomains() <<
" subdomains." <<
endl;
355 <<
"Top level decomposition specifies " <<
nDomains()
356 <<
" domains which is not equal to the product of"
357 <<
" all sub domains " <<
n
369 if (!methods_[i].parallelAware())
386 calcCellCells(
mesh,
identity(cc.size()), cc.size(),
true, cellCells);
multiLevelDecomp(const multiLevelDecomp &)
autoPtr< BasicCompressibleTurbulenceModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleTurbulenceModel::transportModel &transport, const word &propertiesName)
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
#define forAll(list, i)
Loop across all elements in list.
labelListList invertOneToMany(const label len, const labelUList &)
Invert one-to-many map. Unmapped elements will be size 0.
static autoPtr< decompositionMethod > New(const dictionary &decompositionDict)
Return a reference to the selected decomposition method.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
A packed storage unstructured matrix of objects of type <T> using an offset table for access.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Mesh consisting of general polyhedral cells.
virtual bool parallelAware() const
Is method parallel aware (i.e. does it synchronize domains across.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
void decompose(const labelListList &pointPoints, const pointField &points, const scalarField &pointWeights, const labelList &pointMap, const label levelI, labelField &finalDecomp)
Decompose level methodI without addressing.
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.
Class containing processor-to-processor mapping information.
void distribute(List< T > &fld, const bool dummyTransform=true, const int tag=UPstream::msgType()) const
Distribute data using default commsType.
labelList identity(const label len)
Create identity map (map[i] == i) of given length.
A list of keyword definitions, which are a keyword followed by any number of values (e....
void subsetGlobalCellCells(const label nDomains, const label domainI, const labelList &dist, const labelListList &cellCells, const labelList &set, labelListList &subCellCells, labelList &cutConnections) const
Given connectivity across processors work out connectivity.
Macros for easy insertion into run-time selection tables.
Abstract base class for decomposition.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
errorManipArg< error, int > exit(error &err, const int errNo=1)
void setSize(const label)
Reset size of List.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
prefixOSstream Pout(cout, "Pout")
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
label whichProcID(const label i) const
Which processor does global come from? Binary search.
A List with indirect addressing.
labelList invert(const label len, const labelUList &)
Invert one-to-one map. Unmapped elements will be -1.
PtrList< decompositionMethod > methods_
void size(const label)
Override size to be inconsistent with allocated storage.
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
defineTypeNameAndDebug(combustionModel, 0)
labelList findIndices(const ListType &, typename ListType::const_reference, const label start=0)
Find all occurences of given element. Linear search.
const string & prefix() const
Return the prefix of the stream.
label toGlobal(const label i) const
From local to global.
void set(entry *)
Assign a new entry, overwrite any existing entry.