Go to the documentation of this file.
40 MGridGenGAMGAgglomeration,
58 if (interfaces.
set(inti))
60 interfaces[inti].initInternalFieldTransfer
68 if (Pstream::parRun())
70 Pstream::waitRequests();
77 if (interfaces.
set(inti))
84 interfaces[inti].internalFieldTransfer
105 cellToNbrAgglom = -1;
109 if (interfaces.
set(inti))
111 if (isA<processorLduInterface>(interfaces[inti]))
114 refCast<const processorLduInterface>(interfaces[inti]);
119 interfaces[inti].faceCells();
120 const labelList& nbrData = nbrGlobalAgglom[inti];
124 cellToNbrAgglom[faceCells[i]] = nbrData[i];
150 label lowerData = value[lower[faceI]];
151 label upperData = value[upper[faceI]];
153 if (lowerData != -1 && lowerData == upperData)
155 sharedFaces.
insert(faceI);
170 fvMesh_(refCast<const fvMesh>(
mesh))
178 label nProcConsistencyIter
200 const labelList& own = fvMesh_.faceOwner();
205 if (!fvMesh_.isInternalFace(facei))
207 magSb[own[facei]] +=
mag(Sf[facei]);
215 label nCreatedLevels = 0;
217 while (nCreatedLevels < maxLevels_ - 1)
219 label nCoarseCells = -1;
226 meshLevel(nCreatedLevels).lduAddr(),
233 for (
int i=0; i<nProcConsistencyIter; i++)
247 globalAgglom[cellI] = globalNumbering.
toGlobal(agglom[cellI]);
252 swap(interfaces, globalAgglom, nbrGlobalAgglom);
258 getNbrAgglom(addr, interfaces, nbrGlobalAgglom, cellToNbrAgglom);
263 detectSharedFaces(
mesh, cellToNbrAgglom, sharedFaces);
272 label faceI= iter.key();
273 weights[faceI] *= 2.0;
277 finalAgglomPtr = agglomerate
282 meshLevel(nCreatedLevels).lduAddr(),
289 if (continueAgglomerating(nCoarseCells))
291 nCells_[nCreatedLevels] = nCoarseCells;
292 restrictAddressing_.set(nCreatedLevels, finalAgglomPtr);
299 agglomerateLduAddressing(nCreatedLevels);
305 new scalarField(meshLevels_[nCreatedLevels].size())
309 restrictField(*aggVPtr, *VPtr, nCreatedLevels,
false);
325 meshLevels_[nCreatedLevels].upperAddr().size(),
330 restrictFaceField(*aggMagSfPtr, *magSfPtr, nCreatedLevels);
337 magSfPtr = aggMagSfPtr;
344 new scalarField(meshLevels_[nCreatedLevels].size())
348 restrictField(*aggMagSbPtr, *magSbPtr, nCreatedLevels,
false);
351 magSbPtr = aggMagSbPtr;
358 compactLevels(nCreatedLevels);
The class contains the addressing required by the lduMatrix: upper, lower and losort.
void resize(const label newSize)
Resize the hash table for efficiency.
Geometric agglomerated algebraic multigrid agglomeration class.
#define forAll(list, i)
Loop across all elements in list.
A class for managing temporary objects.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
An abstract base class for processor coupled interfaces.
dimensioned< scalar > mag(const dimensioned< Type > &)
label size() const
Return number of equations.
virtual const labelUList & upperAddr() const =0
Return upper addressing.
void getNbrAgglom(const lduAddressing &addr, const lduInterfacePtrsList &interfaces, const PtrList< labelList > &nbrGlobalAgglom, labelList &cellToNbrAgglom) const
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
Pre-declare related SubField type.
bool set(const label) const
Is element set.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
runTime controlDict().lookup("adjustTimeStep") >> adjustTimeStep
void detectSharedFaces(const lduMesh &mesh, const labelList &value, labelHashSet &sharedFaces) const
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
MGridGenGAMGAgglomeration(const MGridGenGAMGAgglomeration &)
Disallow default bitwise copy construct.
virtual int neighbProcNo() const =0
Return neigbour processor number (rank in communicator)
A list of keyword definitions, which are a keyword followed by any number of values (e....
Macros for easy insertion into run-time selection tables.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
void setSize(const label)
Reset size of List.
virtual int myProcNo() const =0
Return processor number (rank in communicator)
void clear()
Clear all entries from table.
virtual const labelUList & lowerAddr() const =0
Return lower addressing.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
dimensionedScalar sqrt(const dimensionedScalar &ds)
volScalarField scalarField(fieldObject, mesh)
bool set(const label) const
Is element set.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
bool insert(const Key &key)
Insert a new entry.
void setSize(const label)
Reset size of PtrList. If extending the PtrList, new entries are.
label readLabel(Istream &is)
label size() const
Return the number of elements in the UList.
defineTypeNameAndDebug(combustionModel, 0)
void swap(const lduInterfacePtrsList &interfaces, const labelUList &cellValues, PtrList< labelList > &nbrValues) const
Abstract base class for meshes which provide LDU addressing for the construction of lduMatrix and LDU...
label toGlobal(const label i) const
From local to global.
label size() const
Return the number of elements in the UPtrList.