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())
142 for (
const int proci : globalCells.subProcs())
146 globalAdjncy.inplaceToGlobal(proci, procSlot);
156 allWeights = globalCells.gather(cWeights);
180 globalCells.scatter(allDecomp, decomp);
197 const word& derivedType,
204 coeffsDict_(findCoeffsDict(derivedType +
"Coeffs",
select))
220 <<
"Number of cell centres (" <<
points.
size()
221 <<
") != number of cells (" <<
mesh.
nCells() <<
")" 226 CompactListList<label> cellCells;
253 <<
"Agglomeration size (" << agglom.
size()
254 <<
") != number of cells (" <<
mesh.
nCells() <<
")" 262 CompactListList<label> cellCells;
293 if (!cellCentres.
empty() && (cellCentres.
size() != globalCellCells.
size()))
296 <<
"Number of cell centres (" << cellCentres.
size()
297 <<
") != number of cells (" << globalCellCells.
size() <<
")" 326 if (!cellCentres.
empty() && (cellCentres.
size() != globalCellCells.
size()))
329 <<
"Number of cell centres (" << cellCentres.
size()
330 <<
") != 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 std::streamsize read(const UPstream::commsTypes commsType, const int fromProcNo, Type *buffer, std::streamsize count, const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm, UPstream::Request *req=nullptr)
Receive buffer contents (contiguous types) from given processor.
static label worldComm
Communicator for all ranks. May differ from commGlobal() if local worlds are in use.
static void waitRequests()
Wait for all requests to finish.
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 non-owning sub-view of a List (allocated or unallocated storage).
void clear()
Clear the list, i.e. set size to zero.
A class for handling words, derived from Foam::string.
bool returnReduceAnd(const bool value, const int communicator=UPstream::worldComm)
Perform logical (and) MPI Allreduce on a copy. Uses UPstream::reduceAnd.
static constexpr int masterNo() noexcept
Relative rank for the master process - is always 0.
metisLikeDecomp(const metisLikeDecomp &)=delete
No copy construct.
static bool write(const UPstream::commsTypes commsType, const int toProcNo, const Type *buffer, std::streamsize count, const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm, UPstream::Request *req=nullptr, const UPstream::sendModes sendMode=UPstream::sendModes::normal)
Write buffer contents (contiguous types only) to given processor.
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.
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.