Go to the documentation of this file.
40 GAMGProcAgglomeration,
41 manualGAMGProcAgglomeration,
49 Foam::manualGAMGProcAgglomeration::manualGAMGProcAgglomeration
56 procAgglomMaps_(
controlDict.lookup(
"processorAgglomeration"))
82 printStats(
Pout, agglom_);
85 if (agglom_.size() >= 1)
89 const label fineLevelIndex = procAgglomMaps_[i].first();
91 if (fineLevelIndex >= agglom_.size())
94 <<
"Ignoring specification for level " << fineLevelIndex
95 <<
" since outside agglomeration." <<
endl;
100 if (agglom_.hasMeshLevel(fineLevelIndex))
103 const lduMesh& levelMesh = agglom_.meshLevel(fineLevelIndex);
112 procAgglomMaps_[i].second();
115 labelList coarseToMaster(clusters.size());
127 const labelList& cluster = clusters[coarseI];
128 coarseToMaster[coarseI] = cluster[0];
132 procAgglomMap[cluster[i]] = coarseI;
135 const label masterIndex =
136 cluster.find(coarseToMaster[coarseI]);
138 if (masterIndex == -1)
141 <<
"At level " << fineLevelIndex
142 <<
" the master processor "
143 << coarseToMaster[coarseI]
144 <<
" is not in the cluster "
149 if (cluster.found(myProcID))
153 agglomProcIDs = cluster;
154 Swap(agglomProcIDs[0], agglomProcIDs[masterIndex]);
160 if (procAgglomMap.found(-1))
163 <<
"At level " << fineLevelIndex
165 << procAgglomMap.find(-1)
166 <<
" is not in any cluster"
202 Pout<<
nl <<
"Agglomerated mesh overview" <<
endl;
203 printStats(
Pout, agglom_);
int debug
Static debugging option.
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
Geometric agglomerated algebraic multigrid agglomeration class.
static label nProcs(const label communicator=0)
Number of processes in parallel run.
Ostream & endl(Ostream &os)
Add newline and flush stream.
prefixOSstream Pout
An Ostream wrapper for parallel output to std::cout.
void Swap(DynamicList< T, SizeMin1 > &a, DynamicList< T, SizeMin2 > &b)
virtual ~manualGAMGProcAgglomeration()
Destructor.
#define forAll(list, i)
Loop across all elements in list.
virtual bool agglomerate()
Modify agglomeration. Return true if modified.
static label allocateCommunicator(const label parent, const labelList &subRanks, const bool doPstream=true)
Allocate a new communicator.
virtual bool agglomerate()=0
Modify agglomeration. Return true if modified.
runTime controlDict().readEntry("adjustTimeStep"
static void freeCommunicator(const label communicator, const bool doPstream=true)
Free a previously allocated communicator.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Macros for easy insertion into run-time selection tables.
errorManipArg< error, int > exit(error &err, const int errNo=1)
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual label comm() const =0
Return communicator used for parallel communication.
#define forAllReverse(list, i)
Reverse loop across all elements in list.
Processor agglomeration of GAMGAgglomerations.
defineTypeNameAndDebug(combustionModel, 0)
#define WarningInFunction
Report a warning using Foam::Warning.
Abstract base class for meshes which provide LDU addressing for the construction of lduMatrix and LDU...