Go to the documentation of this file.
50 for (label levelI = 0; levelI <= agglom.
size(); levelI++)
58 os <<
"Level " << levelI <<
" has no fine mesh:" <<
endl;
72 os <<
"Level " << levelI <<
" agglomeration:" <<
nl
73 <<
" nCoarseCells:" << agglom.
nCells(levelI) <<
nl
74 <<
" nCoarseFaces:" << agglom.
nFaces(levelI) <<
nl
75 <<
" cellRestriction:"
76 <<
" size:" << cellRestrict.size()
77 <<
" max:" <<
max(cellRestrict)
79 <<
" faceRestriction:"
80 <<
" size:" << faceRestrict.size()
81 <<
" max:" <<
max(faceRestrict)
86 forAll(patchFaceRestrict, i)
88 if (patchFaceRestrict[i].size())
93 <<
" size:" << faceRestrict.size()
94 <<
" max:" <<
max(faceRestrict)
129 const label myProcID = Pstream::myProcNo(
mesh.comm());
143 globalNumbering.localSize(myProcID),
144 globalNumbering.localStart(myProcID)
151 const label nReq = Pstream::nRequests();
156 if (interfaces.
set(inti))
158 interfaces[inti].initInternalFieldTransfer
160 Pstream::commsTypes::nonBlocking,
166 if (Pstream::parRun())
168 Pstream::waitRequests(nReq);
173 if (interfaces.
set(inti))
180 interfaces[inti].internalFieldTransfer
182 Pstream::commsTypes::nonBlocking,
209 if (interfaces.
set(inti))
227 cellCells[celli].setSize(nNbrs[celli], -1);
236 label c0 = own[facei];
237 label
c1 = nbr[facei];
239 cellCells[c0][nNbrs[c0]++] = globalIndices[
c1];
240 cellCells[
c1][nNbrs[
c1]++] = globalIndices[c0];
244 if (interfaces.
set(inti))
251 cellCells[c0][nNbrs[c0]++] = nbrGlobalCells[inti][i];
264 cellCells[celli][0] = globalIndices[celli];
273 const label fineLevelIndex,
277 const label procAgglomComm
280 const lduMesh& levelMesh = agglom_.meshLevels_[fineLevelIndex];
281 label levelComm = levelMesh.
comm();
283 if (Pstream::myProcNo(levelComm) != -1)
288 agglom_.procAgglomerateLduAddressing
301 label levelI = fineLevelIndex+1;
302 levelI < agglom_.meshLevels_.size();
306 agglom_.procAgglomerateRestrictAddressing
314 if (Pstream::myProcNo(levelComm) == agglomProcIDs[0])
319 label levelI = fineLevelIndex;
320 levelI < agglom_.meshLevels_.size();
324 agglom_.agglomerateLduAddressing(levelI);
332 label levelI = fineLevelIndex+1;
333 levelI <= agglom_.size();
337 agglom_.clearLevel(levelI);
349 Foam::GAMGProcAgglomeration::GAMGProcAgglomeration
368 auto* ctorPtr = GAMGAgglomerationConstructorTable(
type);
373 <<
"Unknown GAMGProcAgglomeration type "
374 <<
type <<
" for GAMGAgglomeration " << agglom.type() <<
nl <<
nl
375 <<
"Valid GAMGProcAgglomeration types :" <<
endl
376 << 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
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,...
OBJstream os(runTime.globalPath()/outputName)
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.
const T * set(const label i) const
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.