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)
155 if (interfaces.
set(inti))
157 interfaces[inti].initInternalFieldTransfer
172 if (interfaces.
set(inti))
179 interfaces[inti].internalFieldTransfer
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();
287 agglom_.procAgglomerateLduAddressing
300 label levelI = fineLevelIndex+1;
301 levelI < agglom_.meshLevels_.size();
305 agglom_.procAgglomerateRestrictAddressing
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);
367 auto* ctorPtr = GAMGAgglomerationConstructorTable(
type);
372 <<
"Unknown GAMGProcAgglomeration type "
373 <<
type <<
" for GAMGAgglomeration " << agglom.type() <<
nl <<
nl
374 <<
"Valid GAMGProcAgglomeration types :" <<
endl
375 << GAMGAgglomerationConstructorTablePtr_->sortedToc()
Geometric agglomerated algebraic multigrid agglomeration class.
const labelList & faceRestrictAddressing(const label leveli) const
Return face restrict addressing of given level.
const labelListList & patchFaceRestrictAddressing(const label leveli) const
labelList procCommunicator_
Communicator for given level.
PtrList< labelList > agglomProcIDs_
Per level the set of processors to agglomerate. Element 0 is.
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.
void printStats(Ostream &os, GAMGAgglomeration &agglom) const
Debug: write agglomeration info.
static labelListList globalCellCells(const lduMesh &)
Debug: calculate global cell-cells.
virtual ~GAMGProcAgglomeration()
Destructor.
void setSize(const label n)
Alias for resize()
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
const T * set(const label i) const
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
void size(const label n)
Older name for setAddressableSize.
@ nonBlocking
"nonBlocking"
static label nRequests()
Get number of outstanding requests.
static void waitRequests(const label start=0)
Wait until all requests (from start onwards) have finished.
static bool & parRun() noexcept
Test if this a parallel run.
const T * set(const label i) const
label size() const noexcept
The number of elements in the list.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Smooth ATC in cells next to a set of patches supplied by type.
virtual lduInterfacePtrsList interfaces() const
Return a list of pointers for each patch.
virtual const lduAddressing & lduAddr() const
Return ldu addressing.
virtual label comm() const
Return communicator used for parallel communication.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
label localSize() const
My local size.
label localStart() const
My local start.
The class contains the addressing required by the lduMatrix: upper, lower and losort.
virtual const labelUList & upperAddr() const =0
Return upper addressing.
label size() const
Return number of equations.
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.
int myProcNo() const noexcept
Return processor number.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
runTime controlDict().readEntry("adjustTimeStep"
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
#define DebugInFunction
Report an information message using Foam::Info.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
labelList identity(const label len, label start=0)
Return an identity map of the given length with (map[i] == i)
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManipArg< error, int > exit(error &err, const int errNo=1)
void stableSort(UList< T > &list)
Stable sort the list.
constexpr char nl
The newline '\n' character (0x0a)
#define defineRunTimeSelectionTable(baseType, argNames)
Define run-time selection table.
#define forAll(list, i)
Loop across all elements in list.