Go to the documentation of this file.
43 GAMGProcAgglomeration,
44 procFacesGAMGProcAgglomeration,
56 const label singleCellMeshComm,
63 Map<label>& myNeighbours = procFaces[UPstream::myProcNo(
mesh.comm())];
69 if (interfaces.
set(intI))
72 refCast<const processorLduInterface>
76 label size = interfaces[intI].faceCells().
size();
82 Pstream::gatherList(procFaces, Pstream::msgType(),
mesh.comm());
83 Pstream::scatterList(procFaces, Pstream::msgType(),
mesh.comm());
87 if (Pstream::master(
mesh.comm()))
90 label nCells = Pstream::nProcs(
mesh.comm());
101 const Map<label>& neighbours = procFaces[procI];
108 if (iter.key() > procI)
118 weight.
append(weights[i]);
123 faceWeights.transfer(weight);
128 singleCellMeshPtr.
reset
141 return singleCellMeshPtr;
151 label singleCellMeshComm = UPstream::allocateCommunicator
171 if (singleCellMeshPtr.
valid())
177 fineToCoarse = pairGAMGAgglomeration::agglomerate
185 forAll(fineToCoarse, cellI)
187 label coarseI = fineToCoarse[cellI];
188 coarseToMaster[coarseI] =
min(coarseToMaster[coarseI], cellI);
199 Pstream::scatter(fineToCoarse, Pstream::msgType(),
mesh.comm());
200 UPstream::freeCommunicator(singleCellMeshComm);
202 return tfineToCoarse;
212 bool doAgg =
mesh.lduAddr().size() < nAgglomeratingCells_;
251 Pout<<
nl <<
"Starting mesh overview" <<
endl;
252 printStats(
Pout, agglom_);
255 if (agglom_.size() >= 1)
261 label fineLevelIndex = 2;
262 fineLevelIndex < agglom_.size();
266 if (agglom_.hasMeshLevel(fineLevelIndex))
269 const lduMesh& levelMesh = agglom_.meshLevel(fineLevelIndex);
274 if (nProcs > 1 && doProcessorAgglomeration(levelMesh))
278 processorAgglomeration(levelMesh)
280 const labelField& procAgglomMap = tprocAgglomMap();
325 Pout<<
nl <<
"Agglomerated mesh overview" <<
endl;
326 printStats(
Pout, agglom_);
Simple random number generator.
Geometric agglomerated algebraic multigrid agglomeration class.
#define forAll(list, i)
Loop across all elements in list.
A class for managing temporary objects.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
An abstract base class for processor coupled interfaces.
static const label labelMax
procFacesGAMGProcAgglomeration(const procFacesGAMGProcAgglomeration &)
Disallow default bitwise copy construct.
static label nProcs(const label communicator=0)
Number of processes in parallel run.
Ostream & endl(Ostream &os)
Add newline and flush stream.
tmp< labelField > processorAgglomeration(const lduMesh &) const
Construct processor agglomeration: for every processor the.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
static void calculateRegionMaster(const label comm, const labelList &procAgglomMap, labelList &masterProcs, List< label > &agglomProcIDs)
Given fine to coarse processor map determine:
void sortedOrder(const UList< T > &, labelList &order)
Generate the (stable) sort order for the list.
static label allocateCommunicator(const label parent, const labelList &subRanks, const bool doPstream=true)
Allocate a new communicator.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
Field< label > labelField
Specialisation of Field<T> for label.
runTime controlDict().lookup("adjustTimeStep") >> adjustTimeStep
virtual bool agglomerate()=0
Modify agglomeration. Return true if modified.
void clear()
Clear the addressed list, i.e. set the size to zero.
virtual bool agglomerate()
Modify agglomeration. Return true if modified.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
bool doProcessorAgglomeration(const lduMesh &) const
Do we need to agglomerate across processors?
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
static void freeCommunicator(const label communicator, const bool doPstream=true)
Free a previously allocated communicator.
virtual int neighbProcNo() const =0
Return neigbour processor number (rank in communicator)
A list of keyword definitions, which are a keyword followed by any number of values (e....
#define forAllReverse(list, i)
Reverse loop across all elements in list.
Macros for easy insertion into run-time selection tables.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
Simplest contrete lduMesh which stores the addressing needed by lduMatrix.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
autoPtr< lduPrimitiveMesh > singleCellMesh(const label singleCellMeshComm, const lduMesh &mesh, scalarField &faceWeights) const
Return (on master) all single-cell meshes collected. single-cell.
prefixOSstream Pout(cout, "Pout")
virtual ~procFacesGAMGProcAgglomeration()
Destructor.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
bool set(const label) const
Is element set.
bool valid() const
Return true if the autoPtr valid (ie, the pointer is set).
label readLabel(Istream &is)
virtual label comm() const =0
Return communicator used for parallel communication.
void reset(T *=0)
If object pointer already set, delete object and set to given.
A List with indirect addressing.
labelList invert(const label len, const labelUList &)
Invert one-to-one map. Unmapped elements will be -1.
DynamicList< label > comms_
Allocated communicators.
void size(const label)
Override size to be inconsistent with allocated storage.
Processor agglomeration of GAMGAgglomerations.
defineTypeNameAndDebug(combustionModel, 0)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
cachedRandom rndGen(label(0), -1)
Abstract base class for meshes which provide LDU addressing for the construction of lduMatrix and LDU...
label size() const
Return the number of elements in the UPtrList.