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