38 GAMGProcAgglomeration,
39 manualGAMGProcAgglomeration,
50 Foam::manualGAMGProcAgglomeration::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())
94 WarningIn(
"manualGAMGProcAgglomeration::agglomerate()")
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)
146 "manualGAMGProcAgglomeration::agglomerate()" 147 ) <<
"At level " << fineLevelIndex
148 <<
" the master processor " 149 << coarseToMaster[coarseI]
150 <<
" is not in the cluster " 159 agglomProcIDs = cluster;
160 Swap(agglomProcIDs[0], agglomProcIDs[masterIndex]);
170 "manualGAMGProcAgglomeration::agglomerate()" 171 ) <<
"At level " << fineLevelIndex
174 <<
" is not in any cluster" 210 Pout<<
nl <<
"Agglomerated mesh overview" <<
endl;
211 printStats(
Pout, agglom_);
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurence of given element and return index,.
virtual label comm() const =0
Return communicator used for parallel communication.
static label allocateCommunicator(const label parent, const labelList &subRanks, const bool doPstream=true)
Allocate a new communicator.
Geometric agglomerated algebraic multigrid agglomeration class.
T & last()
Return the last element of the 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.
static void freeCommunicator(const label communicator, const bool doPstream=true)
Free a previously allocated communicator.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Abstract base class for meshes which provide LDU addressing for the construction of lduMatrix and LDU...
A list of keyword definitions, which are a keyword followed by any number of values (e...
virtual bool agglomerate()=0
Modify agglomeration. Return true if modified.
static label nProcs(const label communicator=0)
Number of processes in parallel run.
Ostream & endl(Ostream &os)
Add newline and flush stream.
#define WarningIn(functionName)
Report a warning using Foam::Warning.
Macros for easy insertion into run-time selection tables.
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
virtual ~manualGAMGProcAgglomeration()
Destructor.
#define forAllReverse(list, i)
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
Processor agglomeration of GAMGAgglomerations.
virtual bool agglomerate()
Modify agglomeration. Return true if modified.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)
prefixOSstream Pout(cout,"Pout")