41 GAMGProcAgglomeration,
42 manualGAMGProcAgglomeration,
74 printStats(
Pout, agglom_);
77 if (agglom_.size() >= 1)
81 const label fineLevelIndex = procAgglomMaps_[i].first();
83 if (fineLevelIndex >= agglom_.size())
86 <<
"Ignoring specification for level " << fineLevelIndex
87 <<
" since outside agglomeration." <<
endl;
92 if (agglom_.hasMeshLevel(fineLevelIndex))
95 const lduMesh& levelMesh = agglom_.meshLevel(fineLevelIndex);
103 const List<labelList>& clusters =
104 procAgglomMaps_[i].second();
107 labelList coarseToMaster(clusters.size());
119 const labelList& cluster = clusters[coarseI];
120 coarseToMaster[coarseI] = cluster[0];
124 procAgglomMap[cluster[i]] = coarseI;
127 const label masterIndex =
128 cluster.find(coarseToMaster[coarseI]);
130 if (masterIndex == -1)
133 <<
"At level " << fineLevelIndex
134 <<
" the master processor " 135 << coarseToMaster[coarseI]
136 <<
" is not in the cluster " 141 if (cluster.found(myProcID))
145 agglomProcIDs = cluster;
146 Swap(agglomProcIDs[0], agglomProcIDs[masterIndex]);
152 if (procAgglomMap.found(-1))
155 <<
"At level " << fineLevelIndex
157 << procAgglomMap.find(-1)
158 <<
" is not in any cluster" 193 Pout<<
nl <<
"Agglomerated mesh overview" <<
endl;
194 printStats(
Pout, agglom_);
errorManipArg< error, int > exit(error &err, const int errNo=1)
manualGAMGProcAgglomeration(const manualGAMGProcAgglomeration &)=delete
No copy construct.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual bool agglomerate()
Modify agglomeration. Return true if modified.
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
static int myProcNo(const label communicator=worldComm)
Rank of this process in the communicator (starting from masterNo()). Can be negative if the process i...
Lookup type of boundary radiation properties.
Macros for easy insertion into run-time selection tables.
#define forAll(list, i)
Loop across all elements in list.
static label nProcs(const label communicator=worldComm)
Number of ranks in parallel run (for given communicator). It is 1 for serial run. ...
virtual ~manualGAMGProcAgglomeration()
Destructor.
runTime controlDict().readEntry("adjustTimeStep"
The central control dictionary, the contents of which are either taken directly from the FOAM_CONTROL...
int debug
Static debugging option.
defineTypeNameAndDebug(combustionModel, 0)
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
virtual bool agglomerate()=0
Modify agglomeration.
#define WarningInFunction
Report a warning using Foam::Warning.
Processor agglomeration of GAMGAgglomerations.
void Swap(DynamicList< T, SizeMinA > &a, DynamicList< T, SizeMinB > &b)
List< label > labelList
A List of labels.
Geometric agglomerated algebraic multigrid agglomeration class.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
static label allocateCommunicator(const label parent, const labelRange &subRanks, const bool withComponents=true)
Allocate new communicator with contiguous sub-ranks on the parent communicator.