57 procAgglomMaps_(
controlDict.lookup(
"processorAgglomeration"))
83 printStats(
Pout, agglom_);
86 if (agglom_.size() >= 1)
90 const label fineLevelIndex = procAgglomMaps_[i].first();
92 if (fineLevelIndex >= agglom_.size())
95 <<
"Ignoring specification for level " << fineLevelIndex
96 <<
" since outside agglomeration." <<
endl;
101 if (agglom_.hasMeshLevel(fineLevelIndex))
104 const lduMesh& levelMesh = agglom_.meshLevel(fineLevelIndex);
113 procAgglomMaps_[i].second();
128 const labelList& cluster = clusters[coarseI];
129 coarseToMaster[coarseI] = cluster[0];
133 procAgglomMap[cluster[i]] = coarseI;
139 coarseToMaster[coarseI]
142 if (masterIndex == -1)
145 <<
"At level " << fineLevelIndex
146 <<
" the master processor "
147 << coarseToMaster[coarseI]
148 <<
" is not in the cluster "
157 agglomProcIDs = cluster;
158 Swap(agglomProcIDs[0], agglomProcIDs[masterIndex]);
167 <<
"At level " << fineLevelIndex
170 <<
" is not in any cluster"
206 Pout<<
nl <<
"Agglomerated mesh overview" <<
endl;
207 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 keyword definitions, which are a keyword followed by any number of values (e....
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 agglomeration of GAMGAgglomerations.
virtual ~manualGAMGProcAgglomeration()
Destructor.
manualGAMGProcAgglomeration(GAMGAgglomeration &agglom, const dictionary &controlDict)
Construct given agglomerator and controls.
virtual bool agglomerate()
Modify agglomeration. Return true if modified.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define WarningInFunction
Report a warning using Foam::Warning.
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.
defineTypeNameAndDebug(combustionModel, 0)
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,.
runTime controlDict().lookup("adjustTimeStep") >> adjustTimeStep