37 #ifndef GAMGAgglomeration_H
38 #define GAMGAgglomeration_H
55 class distributionMap;
56 class GAMGProcAgglomeration;
163 const label nCoarseCells
195 const label allMeshComm,
196 const label levelIndex
207 const label levelIndex
393 const label fineLevelIndex,
394 const bool procAgglom
403 const label fineLevelIndex
421 const label coarseLevelIndex,
422 const bool procAgglom
Templated abstract base-class for demand-driven mesh objects used to automate their allocation to the...
const lduMesh & mesh() const
Geometric agglomerated algebraic multigrid agglomeration class.
const lduInterfacePtrsList meshInterfaces_
Cached mesh interfaces.
const labelList & faceRestrictAddressing(const label leveli) const
Return face restrict addressing of given level.
void procAgglomerateRestrictAddressing(const label comm, const labelList &procIDs, const label levelIndex)
Collect and combine basic restriction addressing:
bool processorAgglomerate() const
Whether to agglomerate across processors.
TypeName("GAMGAgglomeration")
Runtime type information.
void clearLevel(const label leveli)
const labelListListList & boundaryFaceMap(const label fineLeveli) const
Mapping from processor to procMesh boundary face.
void restrictField(Field< Type > &cf, const Field< Type > &ff, const label fineLevelIndex, const bool procAgglom) const
Restrict (integrate by summation) cell field.
static const GAMGAgglomeration & New(const lduMesh &mesh, const dictionary &controlDict)
Return the selected geometric agglomerator.
void agglomerateLduAddressing(const label fineLevelIndex)
Assemble coarse mesh addressing.
static void calculateRegionMaster(const label comm, const labelList &procAgglomMap, labelList &masterProcs, List< label > &agglomProcIDs)
Given fine to coarse processor map determine:
const boolList & faceFlipMap(const label leveli) const
Return face flip map of given level.
~GAMGAgglomeration()
Destructor.
PtrList< labelListList > patchFaceRestrictAddressing_
Patch-local face restriction addressing array.
const label nCellsInCoarsestLevel_
Number of cells in coarsest level.
PtrList< boolList > faceFlipMap_
Face flip: for faces mapped to internal faces stores whether.
void prolongField(Field< Type > &ff, const Field< Type > &cf, const label coarseLevelIndex, const bool procAgglom) const
Prolong (interpolate by injection) cell field.
PtrList< labelList > nPatchFaces_
The number of (coarse) patch faces in each level.
void operator=(const GAMGAgglomeration &)=delete
Disallow default bitwise assignment.
void procAgglomerateLduAddressing(const label comm, const labelList &procAgglomMap, const labelList &procIDs, const label allMeshComm, const label levelIndex)
Collect and combine processor meshes into allMesh:
const label maxLevels_
Max number of levels.
const labelList & procAgglomMap(const label fineLeveli) const
Mapping from processor to agglomerated processor (global, all.
autoPtr< GAMGProcAgglomeration > procAgglomeratorPtr_
void compactLevels(const label nCreatedLevels)
Shrink the number of levels to that specified.
static void gatherList(const label comm, const labelList &procIDs, const Type &myVal, List< Type > &allVals, const int tag=Pstream::msgType())
Gather value from all procIDs onto procIDs[0].
labelList nFaces_
The number of (coarse) faces in each level.
const labelListList & patchFaceRestrictAddressing(const label leveli) const
PtrList< lduPrimitiveMesh > meshLevels_
Hierarchy of mesh addressing.
const labelList & cellOffsets(const label fineLeveli) const
Mapping from processor to procMesh cells.
bool continueAgglomerating(const label nCells, const label nCoarseCells) const
Check the need for further agglomeration.
labelList nCells_
The number of cells in each level.
bool hasProcMesh(const label fineLeveli) const
Check that level has combined mesh.
declareRunTimeSelectionTable(autoPtr, GAMGAgglomeration, lduMesh,(const lduMesh &mesh, const dictionary &controlDict),(mesh, controlDict))
Runtime selection table for pure geometric agglomerators.
const labelListList & faceMap(const label fineLeveli) const
Mapping from processor to procMesh face.
GAMGAgglomeration(const lduMesh &mesh, const dictionary &controlDict)
Construct given mesh and controls.
const labelList & nPatchFaces(const label leveli) const
Return number of coarse patch faces (before processor.
labelList procCommunicator_
Communicator for given level.
PtrList< labelList > agglomProcIDs_
Per level the set of processors to agglomerate. Element 0 is.
void restrictFaceField(Field< Type > &cf, const Field< Type > &ff, const label fineLevelIndex) const
Restrict (integrate by summation) face field.
PtrList< labelList > procAgglomMap_
Per level, per processor the processor it agglomerates into.
PtrList< labelListList > procBoundaryMap_
Mapping from processor to procMeshLevel boundary.
const labelListList & boundaryMap(const label fineLeveli) const
Mapping from processor to procMesh boundary.
void combineLevels(const label curLevel)
Combine a level with the previous one.
const labelList & agglomProcIDs(const label fineLeveli) const
Set of processors to agglomerate. Element 0 is the.
PtrList< labelList > procCellOffsets_
Mapping from processor to procMeshLevel cells.
PtrList< labelField > restrictAddressing_
Cell restriction addressing array.
PtrList< labelListList > procFaceMap_
Mapping from processor to procMeshLevel face.
PtrList< labelList > faceRestrictAddressing_
Face restriction addressing array.
static bool checkRestriction(labelList &newRestrict, label &nNewCoarse, const lduAddressing &fineAddressing, const labelUList &restrict, const label nCoarse)
Given restriction determines if coarse cells are connected.
const lduInterfacePtrsList & interfaceLevel(const label leveli) const
Return LDU interface addressing of given level.
const labelField & restrictAddressing(const label leveli) const
Return cell restrict addressing of given level.
bool hasMeshLevel(const label leveli) const
Do we have mesh for given level?
label nCells(const label leveli) const
Return number of coarse cells (before processor agglomeration)
label procCommunicator(const label fineLeveli) const
Communicator for current level or -1.
const lduMesh & meshLevel(const label leveli) const
Return LDU mesh of given level.
PtrList< labelListListList > procBoundaryFaceMap_
Mapping from processor to procMeshLevel boundary face.
label nFaces(const label leveli) const
Return number of coarse faces (before processor agglomeration)
Processor agglomeration of GAMGAgglomerations.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
static int & msgType()
Message tag of standard messages.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
A list of keyword definitions, which are a keyword followed by any number of values (e....
The class contains the addressing required by the lduMatrix: upper, lower and losort.
lduMatrix is a general matrix class in which the coefficients are stored as three arrays,...
Abstract base class for meshes which provide LDU addressing for the construction of lduMatrix and LDU...
const FieldField< fvPatchField, Type > & ff(const FieldField< fvPatchField, Type > &bf)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Specialisations of Field<T> for scalar, vector and tensor.
runTime controlDict().lookup("adjustTimeStep") >> adjustTimeStep
Macros to ease declaration of run-time selection tables.