Go to the documentation of this file.
49 for (label levelI = 0; levelI <= agglom.
size(); levelI++)
57 os <<
"Level " << levelI <<
" has no fine mesh:" <<
endl;
71 os <<
"Level " << levelI <<
" agglomeration:" <<
nl
72 <<
" nCoarseCells:" << agglom.
nCells(levelI) <<
nl
73 <<
" nCoarseFaces:" << agglom.
nFaces(levelI) <<
nl
74 <<
" cellRestriction:"
75 <<
" size:" << cellRestrict.size()
76 <<
" max:" <<
max(cellRestrict)
78 <<
" faceRestriction:"
79 <<
" size:" << faceRestrict.size()
80 <<
" max:" <<
max(faceRestrict)
85 forAll(patchFaceRestrict, i)
87 if (patchFaceRestrict[i].size())
92 <<
" size:" << faceRestrict.size()
93 <<
" max:" <<
max(faceRestrict)
128 const label myProcID = Pstream::myProcNo(
mesh.comm());
142 globalNumbering.localSize(myProcID),
143 globalNumbering.localStart(myProcID)
150 const label nReq = Pstream::nRequests();
155 if (interfaces.
set(inti))
157 interfaces[inti].initInternalFieldTransfer
159 Pstream::commsTypes::nonBlocking,
165 if (Pstream::parRun())
167 Pstream::waitRequests(nReq);
172 if (interfaces.
set(inti))
179 interfaces[inti].internalFieldTransfer
181 Pstream::commsTypes::nonBlocking,
208 if (interfaces.
set(inti))
226 cellCells[celli].setSize(nNbrs[celli], -1);
235 label c0 = own[facei];
236 label
c1 = nbr[facei];
238 cellCells[c0][nNbrs[c0]++] = globalIndices[
c1];
239 cellCells[
c1][nNbrs[
c1]++] = globalIndices[c0];
243 if (interfaces.
set(inti))
250 cellCells[c0][nNbrs[c0]++] = nbrGlobalCells[inti][i];
263 cellCells[celli][0] = globalIndices[celli];
272 const label fineLevelIndex,
276 const label procAgglomComm
279 const lduMesh& levelMesh = agglom_.meshLevels_[fineLevelIndex];
280 label levelComm = levelMesh.
comm();
282 if (Pstream::myProcNo(levelComm) != -1)
287 agglom_.procAgglomerateLduAddressing
300 label levelI = fineLevelIndex+1;
301 levelI < agglom_.meshLevels_.size();
305 agglom_.procAgglomerateRestrictAddressing
313 if (Pstream::myProcNo(levelComm) == agglomProcIDs[0])
318 label levelI = fineLevelIndex;
319 levelI < agglom_.meshLevels_.size();
323 agglom_.agglomerateLduAddressing(levelI);
331 label levelI = fineLevelIndex+1;
332 levelI <= agglom_.size();
336 agglom_.clearLevel(levelI);
348 Foam::GAMGProcAgglomeration::GAMGProcAgglomeration
367 auto cstrIter = GAMGAgglomerationConstructorTablePtr_->cfind(
type);
369 if (!cstrIter.found())
372 <<
"Unknown GAMGProcAgglomeration type "
373 <<
type <<
" for GAMGAgglomeration " << agglom.type() <<
nl <<
nl
374 <<
"Valid GAMGProcAgglomeration types :" <<
endl
375 << GAMGAgglomerationConstructorTablePtr_->sortedToc()
The class contains the addressing required by the lduMatrix: upper, lower and losort.
const labelList & faceRestrictAddressing(const label leveli) const
Return face restrict addressing of given level.
label size() const noexcept
The number of elements in the list.
A class for handling words, derived from Foam::string.
Geometric agglomerated algebraic multigrid agglomeration class.
label nFaces(const label leveli) const
Return number of coarse faces (before processor agglomeration)
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
const lduMesh & meshLevel(const label leveli) const
Return LDU mesh of given level.
const labelListList & patchFaceRestrictAddressing(const label leveli) const
const T * set(const label i) const
Return const pointer to element (if set) or nullptr.
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool hasMeshLevel(const label leveli) const
Do we have mesh for given level?
label size() const
Return number of equations.
virtual const labelUList & upperAddr() const =0
Return upper addressing.
PtrList< labelField > restrictAddressing_
Cell restriction addressing array.
#define forAll(list, i)
Loop across all elements in list.
void stableSort(UList< T > &a)
const labelField & restrictAddressing(const label leveli) const
Return cell restrict addressing of given level.
const dimensionedScalar c1
First radiation constant: default SI units: [W/m2].
#define DebugInFunction
Report an information message using Foam::Info.
virtual bool agglomerate()=0
Modify agglomeration. Return true if modified.
runTime controlDict().readEntry("adjustTimeStep"
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
static autoPtr< GAMGProcAgglomeration > New(const word &type, GAMGAgglomeration &agglom, const dictionary &controlDict)
Return the selected agglomerator.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
void printStats(Ostream &os, GAMGAgglomeration &agglom) const
Debug: write agglomeration info.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
PtrList< labelList > procAgglomMap_
Per level, per processor the processor it agglomerates into.
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)
InfoProxy< lduMesh > info() const
Return info proxy.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual const labelUList & lowerAddr() const =0
Return lower addressing.
labelList identity(const label len, label start=0)
Create identity map of the given length with (map[i] == i)
virtual label comm() const =0
Return communicator used for parallel communication.
static labelListList globalCellCells(const lduMesh &)
Debug: calculate global cell-cells.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
label nCells(const label leveli) const
Return number of coarse cells (before processor agglomeration)
defineTypeNameAndDebug(combustionModel, 0)
Smooth ATC in cells next to a set of patches supplied by type.
PtrList< labelList > procCellOffsets_
Mapping from processor to procMeshLevel cells.
PtrList< labelList > agglomProcIDs_
Per level the set of processors to agglomerate. Element 0 is.
Abstract base class for meshes which provide LDU addressing for the construction of lduMatrix and LDU...
virtual ~GAMGProcAgglomeration()
Destructor.
labelList procCommunicator_
Communicator for given level.