55 Info<<
type() <<
"Decomp : running in parallel."
56 <<
" Decomposing all of graph on master processor." <<
endl;
60 const label numCells =
max(0, (xadj.
size()-1));
87 for (
const int proci : globalCells.
subProcs())
142 for (
const int proci : globalCells.
subProcs())
160 allWeights = globalCells.
gather(cWeights);
184 globalCells.
scatter(allDecomp, decomp);
194 const word& derivedType,
201 coeffsDict_(findCoeffsDict(derivedType +
"Coeffs", select))
217 <<
"Can only use this decomposition method for entire mesh" <<
nl
218 <<
"and supply one coordinate (cellCentre) for every cell." <<
nl
220 <<
"The number of cells in the mesh " <<
mesh.
nCells() <<
nl
259 <<
"Size of cell-to-coarse map " << agglom.
size()
260 <<
" differs from number of cells in mesh " <<
mesh.
nCells()
292 forAll(fineDistribution, i)
294 fineDistribution[i] = decomp[agglom[i]];
297 return fineDistribution;
308 if (cellCentres.
size() != globalCellCells.
size())
311 <<
"Inconsistent number of cells (" << globalCellCells.
size()
312 <<
") and number of cell centres (" << cellCentres.
size()
A packed storage unstructured matrix of objects of type <T> using an offset table for access.
const List< T > & values() const noexcept
Return the packed matrix of values.
const labelList & offsets() const noexcept
Return the offset table (= size()+1)
void resize_nocopy(const label len)
Adjust allocated size of list without necessarily.
void resize(const label len)
Adjust allocated size of list.
void clear()
Clear the list, i.e. set size to zero.
virtual bool read()
Re-read model coefficients if they have changed.
A List obtained as a section of another List.
char * data_bytes() noexcept
Return pointer to the underlying array serving as data storage,.
bool empty() const noexcept
True if the UList is empty (ie, size() is zero)
const char * cdata_bytes() const noexcept
Return pointer to the underlying array serving as data storage,.
void size(const label n)
Older name for setAddressableSize.
std::streamsize size_bytes() const noexcept
Number of contiguous bytes for the List data.
T & last()
Return the last element of the list.
commsTypes
Types of communications.
@ nonBlocking
"nonBlocking"
static int & msgType() noexcept
Message tag of standard messages.
static constexpr int masterNo() noexcept
Process index of the master (always 0)
static label worldComm
Default communicator (all processors)
static label nRequests()
Get number of outstanding requests.
static void waitRequests(const label start=0)
Wait until all requests (from start onwards) have finished.
static bool & parRun() noexcept
Test if this a parallel run.
Abstract base class for domain decomposition.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual bool write()
Write the output fields.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
label localSize() const
My local size.
labelRange range() const
Return start/size range of local processor data.
static void gather(const labelUList &offsets, const label comm, const ProcIDsContainer &procIDs, const UList< Type > &fld, List< Type > &allFld, const int tag=UPstream::msgType(), const UPstream::commsTypes=UPstream::commsTypes::nonBlocking)
Collect data in processor order on master (== procIDs[0]).
void inplaceToGlobal(labelUList &labels) const
From local to global index (inplace)
static void scatter(const labelUList &offsets, const label comm, const ProcIDsContainer &procIDs, const UList< Type > &allFld, UList< Type > &fld, const int tag=UPstream::msgType(), const UPstream::commsTypes=UPstream::commsTypes::nonBlocking)
Distribute data in processor order.
labelRange subProcs() const noexcept
Range of process indices for addressed sub-offsets (processes)
label totalSize() const
Global sum of localSizes.
Domain decomposition using METIS-like data structures.
virtual label decomposeSerial(const labelList &adjncy, const labelList &xadj, const List< scalar > &cellWeights, labelList &decomp) const =0
Decomposition with metis-like parameters.
virtual label decomposeGeneral(const labelList &adjncy, const labelList &xadj, const List< scalar > &cellWeights, labelList &decomp) const
Serial and/or collect/distribute for parallel operation.
Mesh consisting of general polyhedral cells.
label nCells() const noexcept
Number of mesh cells.
splitCell * master() const
bool decompose() const noexcept
Query the decompose flag (normally off)
A class for handling words, derived from Foam::string.
Foam::word regionName(Foam::polyMesh::defaultRegion)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
labelList identity(const label len, label start=0)
Return an identity map of the given length with (map[i] == i)
messageStream Info
Information stream (stdout output on master, null elsewhere)
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Ostream & endl(Ostream &os)
Add newline and flush stream.
T returnReduce(const T &value, const BinaryOp &bop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
Reduce (copy) and return value.
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.