57 mergeLevels_(
controlDict.getOrDefault<label>(
"mergeLevels", 1))
74 printStats(
Pout, agglom_);
77 if (agglom_.size() >= 1)
83 label fineLevelIndex = 2;
84 fineLevelIndex < agglom_.size();
88 if (agglom_.hasMeshLevel(fineLevelIndex))
91 const lduMesh& levelMesh = agglom_.meshLevel(fineLevelIndex);
92 label levelComm = levelMesh.comm();
101 forAll(procAgglomMap, proci)
103 procAgglomMap[proci] = proci/(1<<mergeLevels_);
150 Pout<<
nl <<
"Agglomerated mesh overview" <<
endl;
151 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.
static void calculateRegionMaster(const label comm, const labelList &procAgglomMap, labelList &masterProcs, List< label > &agglomProcIDs)
Given fine to coarse processor map determine:
Processor agglomeration of GAMGAgglomerations.
virtual bool agglomerate()=0
Modify agglomeration.
GAMGAgglomeration & agglom_
Reference to agglomeration.
void printStats(Ostream &os, GAMGAgglomeration &agglom) const
Debug: write agglomeration info.
DynamicList< label > comms_
Allocated communicators.
GAMGProcAgglomeration(const GAMGProcAgglomeration &)=delete
No copy construct.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
static int myProcNo(const label communicator=worldComm)
Rank of this process in the communicator (starting from masterNo()). Negative if the process is not a...
static label nProcs(const label communicator=worldComm)
Number of ranks in parallel run (for given communicator). It is 1 for serial run.
static label newCommunicator(const label parent, const labelRange &subRanks, const bool withComponents=true)
Create new communicator with sub-ranks on the parent communicator.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
'Eager' processor agglomeration of GAMGAgglomerations: at every level agglomerates 'mergeLevels' numb...
eagerGAMGProcAgglomeration(const eagerGAMGProcAgglomeration &)=delete
No copy construct.
virtual bool agglomerate()
Modify agglomeration. Return true if modified.
virtual ~eagerGAMGProcAgglomeration()
Destructor.
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.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
runTime controlDict().readEntry("adjustTimeStep"
Namespace for handling debugging switches.
List< label > labelList
A List of labels.
Ostream & endl(Ostream &os)
Add newline and flush stream.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
constexpr char nl
The newline '\n' character (0x0a).
#define forAll(list, i)
Loop across all elements in list.