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)
153 if (interfaces.
set(inti))
155 interfaces[inti].initInternalFieldTransfer
157 Pstream::commsTypes::nonBlocking,
163 if (Pstream::parRun())
165 Pstream::waitRequests();
170 if (interfaces.
set(inti))
177 interfaces[inti].internalFieldTransfer
179 Pstream::commsTypes::nonBlocking,
206 if (interfaces.
set(inti))
224 cellCells[celli].setSize(nNbrs[celli], -1);
233 label c0 = own[facei];
236 cellCells[c0][nNbrs[c0]++] = globalIndices[
c1];
237 cellCells[
c1][nNbrs[
c1]++] = globalIndices[c0];
241 if (interfaces.
set(inti))
248 cellCells[c0][nNbrs[c0]++] = nbrGlobalCells[inti][i];
261 cellCells[celli][0] = globalIndices[celli];
270 const label fineLevelIndex,
274 const label procAgglomComm
277 const lduMesh& levelMesh = agglom_.meshLevels_[fineLevelIndex];
280 if (Pstream::myProcNo(levelComm) != -1)
285 agglom_.procAgglomerateLduAddressing
298 label levelI = fineLevelIndex+1;
299 levelI < agglom_.meshLevels_.size();
303 agglom_.procAgglomerateRestrictAddressing
311 if (Pstream::myProcNo(levelComm) == agglomProcIDs[0])
316 label levelI = fineLevelIndex;
317 levelI < agglom_.meshLevels_.size();
321 agglom_.agglomerateLduAddressing(levelI);
329 label levelI = fineLevelIndex+1;
330 levelI <= agglom_.size();
334 agglom_.clearLevel(levelI);
346 Foam::GAMGProcAgglomeration::GAMGProcAgglomeration
365 auto cstrIter = GAMGAgglomerationConstructorTablePtr_->cfind(
type);
367 if (!cstrIter.found())
370 <<
"Unknown GAMGProcAgglomeration type "
371 <<
type <<
" for GAMGAgglomeration " << agglom.type() <<
nl <<
nl
372 <<
"Valid GAMGProcAgglomeration types :" <<
endl
373 << 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].
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
#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.