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()
#define forAll(list, i)
Loop across all elements in list.
virtual const word & type() const
Runtime type information.
Geometric agglomerated algebraic multigrid agglomeration class.
const labelList & faceRestrictAddressing(const label leveli) const
Return face restrict addressing of given level.
PtrList< labelList > agglomProcIndices_
Per level the set of processors to agglomerate. Element 0 is.
const labelListList & patchFaceRestrictAddressing(const label leveli) const
labelList procCommunicator_
Communicator for given level.
PtrList< labelList > procAgglomMap_
Per level, per processor the processor it agglomerates into.
PtrList< labelList > procCellOffsets_
Mapping from processor to procMeshLevel cells.
PtrList< labelField > restrictAddressing_
Cell restriction addressing array.
const labelField & restrictAddressing(const label leveli) const
Return cell restrict addressing of given level.
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)
const lduMesh & meshLevel(const label leveli) const
Return LDU mesh of given level.
label nFaces(const label leveli) const
Return number of coarse faces (before processor agglomeration)
Processor agglomeration of GAMGAgglomerations.
virtual bool agglomerate()=0
Modify agglomeration. Return true if modified.
static autoPtr< GAMGProcAgglomeration > New(const word &type, GAMGAgglomeration &agglom, const dictionary &controlDict)
Return the selected agglomerator.
void printStats(Ostream &os, GAMGAgglomeration &agglom) const
Debug: write agglomeration info.
static labelListList globalCellCells(const lduMesh &)
Debug: calculate global cell-cells.
virtual ~GAMGProcAgglomeration()
Destructor.
GAMGProcAgglomeration(GAMGAgglomeration &agglom, const dictionary &controlDict)
Construct given agglomerator and controls.
void size(const label)
Override size to be inconsistent with allocated storage.
void setSize(const label)
Reset size of List.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
bool set(const label) const
Is element set.
static void waitRequests(const label start=0)
Wait until all requests (from start onwards) have finished.
static bool & parRun()
Is this a parallel run?
static int & msgType()
Message tag of standard messages.
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
bool set(const label) const
Is element set.
label size() const
Return the number of elements in the UPtrList.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
label toGlobal(const label i) const
From local to global.
The class contains the addressing required by the lduMatrix: upper, lower and losort.
label size() const
Return number of equations.
virtual const labelUList & upperAddr() const =0
Return upper addressing.
virtual const labelUList & lowerAddr() const =0
Return lower addressing.
Abstract base class for meshes which provide LDU addressing for the construction of lduMatrix and LDU...
virtual label comm() const =0
Return communicator used for parallel communication.
InfoProxy< lduMesh > info() const
Return info proxy.
virtual lduInterfacePtrsList interfaces() const =0
Return a list of pointers for each patch.
virtual const lduAddressing & lduAddr() const =0
Return ldu addressing.
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define InfoInFunction
Report an information message using Foam::Info.
const dimensionedScalar c1
First radiation constant: default SI units: [W/m^2].
errorManipArg< error, int > exit(error &err, const int errNo=1)
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
defineTypeNameAndDebug(combustionModel, 0)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
void stableSort(UList< T > &)
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
runTime controlDict().lookup("adjustTimeStep") >> adjustTimeStep