38 GAMGProcAgglomeration,
39 manualGAMGProcAgglomeration,
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();
116 labelList coarseToMaster(clusters.size());
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.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual bool agglomerate()
Modify agglomeration. Return true if modified.
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Abstract base class for meshes which provide LDU addressing for the construction of lduMatrix and LDU...
#define forAllReverse(list, i)
Reverse loop across all elements in list.
virtual label comm() const =0
Return communicator used for parallel communication.
manualGAMGProcAgglomeration(GAMGAgglomeration &agglom, const dictionary &controlDict)
Construct given agglomerator and controls.
Macros for easy insertion into run-time selection tables.
virtual ~manualGAMGProcAgglomeration()
Destructor.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurrence of given element and return index,.
virtual bool agglomerate()=0
Modify agglomeration. Return true if modified.
static label nProcs(const label communicator=0)
Number of processes in parallel run.
#define WarningInFunction
Report a warning using Foam::Warning.
prefixOSstream Pout(cout, "Pout")
Processor agglomeration of GAMGAgglomerations.
static label allocateCommunicator(const label parent, const labelList &subRanks, const bool doPstream=true)
Allocate a new communicator.
T & last()
Return the last element of the list.
Geometric agglomerated algebraic multigrid agglomeration class.
static void freeCommunicator(const label communicator, const bool doPstream=true)
Free a previously allocated communicator.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.