47 for (
label levelI = 0; levelI <= agglom.
size(); levelI++)
55 os <<
"Level " << levelI <<
" has no fine mesh:" <<
endl;
69 os <<
"Level " << levelI <<
" agglomeration:" <<
nl 70 <<
" nCoarseCells:" << agglom.
nCells(levelI) <<
nl 71 <<
" nCoarseFaces:" << agglom.
nFaces(levelI) <<
nl 72 <<
" cellRestriction:" 73 <<
" size:" << cellRestrict.
size()
74 <<
" max:" <<
max(cellRestrict)
76 <<
" faceRestriction:" 77 <<
" size:" << faceRestrict.
size()
78 <<
" max:" <<
max(faceRestrict)
83 forAll(patchFaceRestrict, i)
85 if (patchFaceRestrict[i].size())
90 <<
" size:" << faceRestrict.
size()
91 <<
" max:" <<
max(faceRestrict)
137 forAll(globalIndices, celli)
139 globalIndices[celli] = globalNumbering.toGlobal(myProcID, celli);
149 if (interfaces.
set(inti))
151 interfaces[inti].initInternalFieldTransfer
166 if (interfaces.
set(inti))
173 interfaces[inti].internalFieldTransfer
202 if (interfaces.
set(inti))
204 const labelUList& faceCells = interfaces[inti].faceCells();
208 nNbrs[faceCells[i]]++;
220 cellCells[celli].setSize(nNbrs[celli], -1);
229 label c0 = own[facei];
232 cellCells[c0][nNbrs[c0]++] = globalIndices[
c1];
233 cellCells[
c1][nNbrs[
c1]++] = globalIndices[c0];
237 if (interfaces.
set(inti))
239 const labelUList& faceCells = interfaces[inti].faceCells();
243 label c0 = faceCells[i];
244 cellCells[c0][nNbrs[c0]++] = nbrGlobalCells[inti][i];
257 cellCells[celli][0] = globalIndices[celli];
266 const label fineLevelIndex,
270 const label procAgglomComm
273 const lduMesh& levelMesh = agglom_.meshLevels_[fineLevelIndex];
281 agglom_.procAgglomerateLduAddressing
294 label levelI = fineLevelIndex+1;
295 levelI < agglom_.meshLevels_.size();
299 agglom_.procAgglomerateRestrictAddressing
312 label levelI = fineLevelIndex;
313 levelI < agglom_.meshLevels_.size();
317 agglom_.agglomerateLduAddressing(levelI);
325 label levelI = fineLevelIndex+1;
326 levelI <= agglom_.size();
330 agglom_.clearLevel(levelI);
364 GAMGAgglomerationConstructorTable::iterator cstrIter =
365 GAMGAgglomerationConstructorTablePtr_->find(type);
367 if (cstrIter == GAMGAgglomerationConstructorTablePtr_->end())
370 <<
"Unknown GAMGProcAgglomeration type " 371 << type <<
" for GAMGAgglomeration " << agglom.type() <<
nl <<
nl 372 <<
"Valid GAMGProcAgglomeration types are :" <<
endl 373 << GAMGAgglomerationConstructorTablePtr_->sortedToc()
virtual lduInterfacePtrsList interfaces() const =0
Return a list of pointers for each patch.
const labelList & faceRestrictAddressing(const label leveli) const
Return face restrict addressing of given level.
InfoProxy< lduMesh > info() const
Return info proxy.
#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.
errorManipArg< error, int > exit(error &err, const int errNo=1)
runTime controlDict().lookup("adjustTimeStep") >> adjustTimeStep
A list of keyword definitions, which are a keyword followed by any number of values (e...
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const lduMesh & meshLevel(const label leveli) const
Return LDU mesh of given level.
PtrList< labelList > procCellOffsets_
Mapping from processor to procMeshLevel cells.
void size(const label)
Override size to be inconsistent with allocated storage.
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Abstract base class for meshes which provide LDU addressing for the construction of lduMatrix and LDU...
static int & msgType()
Message tag of standard messages.
virtual label comm() const =0
Return communicator used for parallel communication.
void printStats(Ostream &os, GAMGAgglomeration &agglom) const
Debug: write agglomeration info.
virtual const labelUList & lowerAddr() const =0
Return lower addressing.
PtrList< labelList > agglomProcIDs_
Per level the set of processors to agglomerate. Element 0 is.
static autoPtr< GAMGProcAgglomeration > New(const word &type, GAMGAgglomeration &agglom, const dictionary &controlDict)
Return the selected agglomerator.
const dimensionedScalar c1
First radiation constant: default SI units: [W/m^2].
labelList procCommunicator_
Communicator for given level.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
A class for handling words, derived from string.
virtual const labelUList & upperAddr() const =0
Return upper addressing.
virtual const lduAddressing & lduAddr() const =0
Return ldu addressing.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
PtrList< labelField > restrictAddressing_
Cell restriction addressing array.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
bool set(const label) const
Is element set.
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
defineTypeNameAndDebug(combustionModel, 0)
label nFaces(const label leveli) const
Return number of coarse faces (before processor agglomeration)
static void waitRequests(const label start=0)
Wait until all requests (from start onwards) have finished.
static labelListList globalCellCells(const lduMesh &)
Debug: calculate global cell-cells.
label size() const
Return the number of elements in the UPtrList.
virtual bool agglomerate()=0
Modify agglomeration. Return true if modified.
static bool & parRun()
Is this a parallel run?
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
PtrList< labelList > procAgglomMap_
Per level, per processor the processor it agglomerates into.
const labelField & restrictAddressing(const label leveli) const
Return cell restrict addressing of given level.
virtual ~GAMGProcAgglomeration()
Destructor.
The class contains the addressing required by the lduMatrix: upper, lower and losort.
const labelListList & patchFaceRestrictAddressing(const label leveli) const
void stableSort(UList< T > &)
GAMGProcAgglomeration(GAMGAgglomeration &agglom, const dictionary &controlDict)
Construct given agglomerator and controls.
Geometric agglomerated algebraic multigrid agglomeration class.
bool hasMeshLevel(const label leveli) const
Do we have mesh for given level?
label nCells(const label leveli) const
Return number of coarse cells (before processor agglomeration)
label size() const
Return number of equations.
#define InfoInFunction
Report an information message using Foam::Info.