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();
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_);
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
Geometric agglomerated algebraic multigrid agglomeration class.
Processor agglomeration of GAMGAgglomerations.
virtual bool agglomerate()=0
Modify agglomeration. Return true if modified.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
label nProcs() const noexcept
Number of ranks associated with PstreamBuffers.
bool found(const T &val, label pos=0) const
True if the value if found in the list.
label find(const T &val, label pos=0) const
Find index of the first occurrence of the value.
void size(const label n)
Older name for setAddressableSize.
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 allocateCommunicator(const label parent, const labelList &subRanks, const bool doPstream=true)
Allocate a new communicator.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
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.
virtual bool agglomerate()
Modify agglomeration. Return true if modified.
int myProcNo() const noexcept
Return processor number.
Lookup type of boundary radiation properties.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
runTime controlDict().readEntry("adjustTimeStep"
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define WarningInFunction
Report a warning using Foam::Warning.
void Swap(DynamicList< T, SizeMinA > &a, DynamicList< T, SizeMinB > &b)
Ostream & endl(Ostream &os)
Add newline and flush stream.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)
#define forAll(list, i)
Loop across all elements in list.
#define forAllReverse(list, i)
Reverse loop across all elements in list.