57 Info<<
type() <<
"Decomp : running in parallel." 58 <<
" Decomposing all of graph on master processor." <<
endl;
82 allXadj.
resize(globalCells.totalSize()+1);
83 allXadj.
back() = globalAdjncy.totalSize();
89 for (
const int proci : globalCells.subProcs())
104 procSlot.size_bytes(),
144 for (
const int proci : globalCells.subProcs())
148 globalAdjncy.inplaceToGlobal(proci, procSlot);
158 allWeights = globalCells.gather(cWeights);
182 globalCells.scatter(allDecomp, decomp);
199 const word& derivedType,
206 coeffsDict_(findCoeffsDict(derivedType +
"Coeffs",
select))
222 <<
"Number of cell centres (" <<
points.
size()
223 <<
") != number of cells (" <<
mesh.
nCells() <<
")" 228 CompactListList<label> cellCells;
255 <<
"Agglomeration size (" << agglom.
size()
256 <<
") != number of cells (" <<
mesh.
nCells() <<
")" 264 CompactListList<label> cellCells;
295 if (!cellCentres.
empty() && (cellCentres.
size() != globalCellCells.
size()))
298 <<
"Number of cell centres (" << cellCentres.
size()
299 <<
") != number of cells (" << globalCellCells.
size() <<
")" 328 if (!cellCentres.
empty() && (cellCentres.
size() != globalCellCells.
size()))
331 <<
"Number of cell centres (" << cellCentres.
size()
332 <<
") != number of cells (" << globalCellCells.
size() <<
")" void size(const label n)
Older name for setAddressableSize.
const labelList & offsets() const noexcept
Return the offset table (= size()+1)
errorManipArg< error, int > exit(error &err, const int errNo=1)
label size() const noexcept
The primary size (the number of rows/sublists)
void resize(const label len)
Adjust allocated size of list.
commsTypes
Communications types.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#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.
static label nRequests() noexcept
Number of outstanding requests (on the internal list of requests)
List< bool > select(const label n, const labelUList &locations)
Construct a selection list of bools (all false) with the given pre-size, subsequently add specified l...
bool empty() const noexcept
True if List is empty (ie, size() is zero)
Ostream & endl(Ostream &os)
Add newline and flush stream.
static bool & parRun() noexcept
Test if this a parallel run.
void resize_nocopy(const label len)
Adjust allocated size of list without necessarily.
static int & msgType() noexcept
Message tag of standard messages.
static CompactListList< T > pack(const UList< SubListType > &lists, const bool checkOverflow=false)
Construct by packing together the list of lists.
static label worldComm
Communicator for all ranks. May differ from commGlobal() if local worlds are in use.
char * data_bytes() noexcept
Return pointer to the underlying array serving as data storage,.
static void waitRequests()
Wait for all requests to finish.
const char * cdata_bytes() const noexcept
Return pointer to the underlying array serving as data storage,.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
A List obtained as a section of another List.
bool returnReduceAnd(const bool value, const label comm=UPstream::worldComm)
Perform logical (and) MPI Allreduce on a copy. Uses UPstream::reduceAnd.
void clear()
Clear the list, i.e. set size to zero.
A class for handling words, derived from Foam::string.
static constexpr int masterNo() noexcept
Relative rank for the master process - is always 0.
metisLikeDecomp(const metisLikeDecomp &)=delete
No copy construct.
Abstract base class for domain decomposition.
virtual labelList decompose(const polyMesh &mesh, const pointField &points=pointField::null(), const scalarField &pointWeights=scalarField::null()) const
Return for every coordinate the wanted processor number.
A packed storage of objects of type <T> using an offset table for access.
int debug
Static debugging option.
virtual label decomposeSerial(const labelList &adjncy, const labelList &xadj, const List< scalar > &cellWeights, labelList &decomp) const =0
Decomposition with metis-like parameters.
Foam::word regionName(args.getOrDefault< word >("region", Foam::polyMesh::defaultRegion))
label nCells() const noexcept
Number of mesh cells.
static bool master(const label communicator=worldComm)
True if process corresponds to the master rank in the communicator.
static bool write(const UPstream::commsTypes commsType, const int toProcNo, const char *buf, const std::streamsize bufSize, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm, UPstream::Request *req=nullptr, const UPstream::sendModes sendMode=UPstream::sendModes::normal)
Write buffer contents to given processor.
T & back()
Access last element of the list, position [size()-1].
"nonBlocking" (immediate) : (MPI_Isend, MPI_Irecv)
messageStream Info
Information stream (stdout output on master, null elsewhere)
const List< T > & values() const noexcept
Return the packed values.
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.
static void calcCellCells(const polyMesh &mesh, const labelUList &agglom, const label nLocalCoarse, const bool parallel, CompactListList< label > &cellCells)
Determine (local or global) cellCells from mesh agglomeration.
List< label > labelList
A List of labels.
std::streamsize size_bytes() const noexcept
Number of contiguous bytes for the List data.
static std::streamsize read(const UPstream::commsTypes commsType, const int fromProcNo, char *buf, const std::streamsize bufSize, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm, UPstream::Request *req=nullptr)
Read buffer contents from given processor.