54 procAgglomMaps_(
dict.
lookup(
"processorAgglomeration"))
80 printStats(
Pout, agglom_);
83 if (agglom_.size() >= 1)
87 const label fineLevelIndex = procAgglomMaps_[i].first();
89 if (fineLevelIndex >= agglom_.size())
92 <<
"Ignoring specification for level " << fineLevelIndex
93 <<
" since outside agglomeration." <<
endl;
98 if (agglom_.hasMeshLevel(fineLevelIndex))
101 const lduMesh& levelMesh = agglom_.meshLevel(fineLevelIndex);
110 procAgglomMaps_[i].second();
125 const labelList& cluster = clusters[coarseI];
126 coarseToMaster[coarseI] = cluster[0];
130 procAgglomMap[cluster[i]] = coarseI;
136 coarseToMaster[coarseI]
139 if (masterIndex == -1)
142 <<
"At level " << fineLevelIndex
143 <<
" the master processor "
144 << coarseToMaster[coarseI]
145 <<
" is not in the cluster "
154 agglomProcIDs = cluster;
155 Swap(agglomProcIDs[0], agglomProcIDs[masterIndex]);
164 <<
"At level " << fineLevelIndex
167 <<
" is not in any cluster"
203 Pout<<
nl <<
"Agglomerated mesh overview" <<
endl;
204 printStats(
Pout, agglom_);
#define forAll(list, i)
Loop across all elements in list.
#define forAllReverse(list, i)
Reverse loop across all elements in list.
Macros for easy insertion into run-time selection tables.
Geometric agglomerated algebraic multigrid agglomeration class.
Processor agglomeration of GAMGAgglomerations.
virtual bool agglomerate()=0
Modify agglomeration. Return true if modified.
void size(const label)
Override size to be inconsistent with allocated storage.
T & last()
Return the last element of the list.
static void freeCommunicator(const label communicator, const bool doPstream=true)
Free a previously allocated communicator.
static label nProcs(const label communicator=0)
Number of processes in parallel run.
static label allocateCommunicator(const label parent, const labelList &subRanks, const bool doPstream=true)
Allocate a new communicator.
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
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.
Manual processor agglomerator.
virtual ~manualGAMGProcAgglomeration()
Destructor.
virtual bool agglomerate()
Modify agglomeration. Return true if modified.
manualGAMGProcAgglomeration(GAMGAgglomeration &agglom, const dictionary &dict)
Construct given agglomerator and controls.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define WarningInFunction
Report a warning using Foam::Warning.
const unitSet & lookup(const word &unitName)
Lookup and return the named unit from the table.
errorManipArg< error, int > exit(error &err, const int errNo=1)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
addToRunTimeSelectionTable(polyPatch, mergedCyclicPolyPatch, word)
Ostream & endl(Ostream &os)
Add newline and flush stream.
prefixOSstream Pout(cout, "Pout")
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurrence of given element and return index,.
defineTypeNameAndDebug(atmosphericBoundaryLayer, 0)