48 for (
const label val : map)
70 for (
const label val : map)
99 for (label index : map)
103 index =
mag(index)-1;
106 maxIndex =
max(maxIndex, index);
121 if (elements.empty())
128 bitSet unvisited(elements);
129 label nUnmapped = unvisited.count();
135 for (label index : map)
137 index =
mag(index)-1;
139 if (unvisited.unset(index))
142 if (!nUnmapped)
break;
151 for (label index : map)
153 if (unvisited.unset(index))
156 if (!nUnmapped)
break;
169 const label expectedSize,
170 const label receivedSize
173 if (receivedSize != expectedSize)
176 <<
"From processor " << proci
177 <<
" : expected " << expectedSize
178 <<
" but received " << receivedSize <<
" elements" <<
nl
198 List<labelPair> allComms;
208 if (subMap[proci].size())
211 commsSet.insert(
labelPair(myRank, proci));
213 if (constructMap[proci].size())
216 commsSet.insert(
labelPair(proci, myRank));
220 allComms = commsSet.toc();
233 for (
const labelPair& connection : nbrData)
235 allComms.push_uniq(connection);
257 ).procSchedule()[myRank]
278 return *schedulePtr_;
304 forAll(constructMap_, proci)
306 const labelList& construct = constructMap_[proci];
307 if (constructHasFlip_)
311 label index =
mag(construct[i])-1;
312 minIndex[proci] =
min(minIndex[proci], index);
313 maxIndex[proci] =
max(maxIndex[proci], index);
320 label index = construct[i];
321 minIndex[proci] =
min(minIndex[proci], index);
322 maxIndex[proci] =
max(maxIndex[proci], index);
331 localSize = maxIndex[myRank]+1;
334 os <<
"Layout: (constructSize:" << constructSize_
335 <<
" subHasFlip:" << subHasFlip_
336 <<
" constructHasFlip:" << constructHasFlip_
338 <<
"local (processor " << myRank <<
"):" <<
nl
339 <<
" start : 0" <<
nl
340 <<
" size : " << localSize <<
endl;
342 label offset = localSize;
345 if (proci != myRank && !constructMap_[proci].empty())
351 size = maxIndex[proci]-minIndex[proci]+1;
352 if (minIndex[proci] != offset)
355 <<
"offset:" << offset
356 <<
" proci:" << proci
357 <<
" minIndex:" << minIndex[proci]
362 os <<
"processor " << proci <<
':' <<
nl
363 <<
" start : " << offset <<
nl
364 <<
" size : " << size <<
endl;
385 for (
const label globalIdx : elements)
387 if (globalIdx != -1 && !globalNumbering.isLocal(myRank, globalIdx))
389 label proci = globalNumbering.whichProcID(myRank, globalIdx);
394 compactMap.resize_nocopy(nProcs);
398 compactMap[proci].clear();
401 compactMap[proci].reserve(nNonLocal[proci]);
407 for (
const label globalIdx : elements)
409 if (globalIdx != -1 && !globalNumbering.isLocal(myRank, globalIdx))
411 label proci = globalNumbering.whichProcID(myRank, globalIdx);
412 label index = globalNumbering.toLocal(proci, globalIdx);
413 compactMap[proci].insert(index, compactMap[proci].size());
432 for (
const labelList& cCells : cellCells)
434 for (
const label globalIdx : cCells)
436 if (globalIdx != -1 && !globalNumbering.isLocal(myRank, globalIdx))
438 label proci = globalNumbering.whichProcID(myRank, globalIdx);
444 compactMap.resize_nocopy(nProcs);
448 compactMap[proci].clear();
451 compactMap[proci].reserve(nNonLocal[proci]);
459 for (
const label globalIdx : cCells)
461 if (globalIdx != -1 && !globalNumbering.isLocal(myRank, globalIdx))
463 label proci = globalNumbering.whichProcID(myRank, globalIdx);
464 label index = globalNumbering.toLocal(proci, globalIdx);
465 compactMap[proci].insert(index, compactMap[proci].size());
489 compactStart[myRank] = 0;
490 constructSize_ = globalNumbering.localSize(myRank);
491 forAll(compactStart, proci)
495 compactStart[proci] = constructSize_;
496 constructSize_ += compactMap[proci].
size();
506 constructMap_.setSize(nProcs);
512 label nLocal = globalNumbering.localSize(myRank);
513 wantedRemoteElements[proci] =
identity(nLocal);
514 constructMap_[proci] =
identity(nLocal);
519 labelList& remoteElem = wantedRemoteElements[proci];
520 labelList& localElem = constructMap_[proci];
521 remoteElem.
setSize(compactMap[proci].size());
522 localElem.
setSize(compactMap[proci].size());
526 const label compactI = compactStart[proci] + iter.val();
527 remoteElem[i] = iter.key();
528 localElem[i] = compactI;
529 iter.val() = compactI;
535 subMap_.setSize(nProcs);
538 wantedRemoteElements,
545 for (label& elem : elements)
547 elem =
renumber(globalNumbering, comm_, compactMap, elem);
569 compactStart[myRank] = 0;
570 constructSize_ = globalNumbering.
localSize(myRank);
571 forAll(compactStart, proci)
575 compactStart[proci] = constructSize_;
576 constructSize_ += compactMap[proci].
size();
586 constructMap_.setSize(nProcs);
592 label nLocal = globalNumbering.
localSize(myRank);
593 wantedRemoteElements[proci] =
identity(nLocal);
594 constructMap_[proci] =
identity(nLocal);
599 labelList& remoteElem = wantedRemoteElements[proci];
600 labelList& localElem = constructMap_[proci];
601 remoteElem.
setSize(compactMap[proci].size());
602 localElem.setSize(compactMap[proci].size());
606 const label compactI = compactStart[proci] + iter.val();
607 remoteElem[i] = iter.key();
608 localElem[i] = compactI;
609 iter.val() = compactI;
615 subMap_.setSize(nProcs);
618 wantedRemoteElements,
627 for (label& celli : cCells)
629 celli =
renumber(globalNumbering, comm_, compactMap, celli);
649 constructHasFlip_(
false),
651 schedulePtr_(
nullptr)
657 constructSize_(map.constructSize_),
658 subMap_(map.subMap_),
659 constructMap_(map.constructMap_),
660 subHasFlip_(map.subHasFlip_),
661 constructHasFlip_(map.constructHasFlip_),
663 schedulePtr_(nullptr)
677 const label constructSize,
680 const bool subHasFlip,
681 const bool constructHasFlip,
685 constructSize_(constructSize),
686 subMap_(std::move(subMap)),
687 constructMap_(std::move(constructMap)),
691 schedulePtr_(nullptr)
706 constructHasFlip_(false),
708 schedulePtr_(nullptr)
713 if (sendProcs.
size() != recvProcs.
size())
716 <<
"The send and receive data is not the same length. sendProcs:"
717 << sendProcs.
size() <<
" recvProcs:" << recvProcs.
size()
725 forAll(sendProcs, sampleI)
727 const label sendProc = sendProcs[sampleI];
728 const label recvProc = recvProcs[sampleI];
733 if (myRank == sendProc)
738 if (myRank == recvProc)
745 subMap_.setSize(nProcs);
746 constructMap_.setSize(nProcs);
749 subMap_[proci].setSize(nSend[proci]);
750 constructMap_[proci].setSize(nRecv[proci]);
756 label maxRecvIndex = -1;
758 forAll(sendProcs, sampleI)
760 const label sendProc = sendProcs[sampleI];
761 const label recvProc = recvProcs[sampleI];
763 if (myRank == sendProc)
766 subMap_[recvProc][nSend[recvProc]++] = sampleI;
768 if (myRank == recvProc)
771 constructMap_[sendProc][nRecv[sendProc]++] = sampleI;
772 maxRecvIndex = sampleI;
776 constructSize_ = maxRecvIndex+1;
793 constructHasFlip_(false),
795 schedulePtr_(nullptr)
845 const globalIndex& globalNumbering,
847 List<Map<label>>& compactMap,
856 constructHasFlip_(false),
858 schedulePtr_(nullptr)
908 const layoutTypes constructLayout,
910 const bool subHasFlip,
911 const bool constructHasFlip,
916 subMap_(std::move(subMap)),
918 subHasFlip_(subHasFlip),
919 constructHasFlip_(constructHasFlip),
921 schedulePtr_(nullptr)
931 constructMap_.
resize(nProcs);
937 forAll(constructMap_, proci)
939 const label len = recvSizes[proci];
941 constructMap_[proci] =
identity(len, constructSize_);
942 constructSize_ += len;
951 const label len = recvSizes[myRank];
953 constructMap_[myRank] =
identity(len, constructSize_);
954 constructSize_ += len;
958 forAll(constructMap_, proci)
962 const label len = recvSizes[proci];
964 constructMap_[proci] =
identity(len, constructSize_);
965 constructSize_ += len;
975 const bool subHasFlip,
976 const bool constructHasFlip,
982 layoutTypes::localFirst,
1003 constructHasFlip_(false),
1005 schedulePtr_(nullptr)
1020 label validMapi = -1;
1023 if (maps.
set(mapi) && localRanks[mapi] != -1)
1030 if (validMapi == -1)
1035 subHasFlip_ = maps[validMapi].subHasFlip();
1036 constructHasFlip_ = maps[validMapi].constructHasFlip();
1038 const label nNewRanks = newToOldRanks.
size();
1047 if (localRanks.
size() != maps.
size())
1050 <<
"Number of maps:" << maps.
size()
1051 <<
" number of localRanks:" << localRanks.
size()
1056 const auto& map0 = maps[validMapi];
1059 if (!maps.
set(mapi) || localRanks[mapi] == -1)
1064 const auto& map = maps[mapi];
1069 (map.subHasFlip() != map0.subHasFlip())
1070 || (map.constructHasFlip() != map0.constructHasFlip())
1074 <<
"Maps should all be the same form"
1076 <<
" has comm:" << map.comm()
1077 <<
" subHasFlip:" << map.subHasFlip()
1078 <<
" constructHasFlip:" << map.constructHasFlip()
1079 <<
" which is different from map 0 "
1080 <<
" comm:" << map0.comm()
1081 <<
" subHasFlip:" << map0.subHasFlip()
1082 <<
" constructHasFlip:" << map0.constructHasFlip()
1086 const label localRank = localRanks[mapi];
1087 const auto& constructOwn = maps[mapi].constructMap()[localRank];
1090 if (constructOwn[i] != i)
1093 <<
"Maps constructMap not identity."
1095 <<
" constructMap:" <<
flatOutput(constructOwn)
1107 if (!maps.
set(mapi))
1112 const label nOldRanks = maps[mapi].constructMap().
size();
1113 labelList& starts = startOfRemote[mapi];
1118 const labelList& map = maps[mapi].constructMap()[oldRanki];
1127 starts[oldRanki] =
min(starts[oldRanki], index);
1134 constructMap_.resize_nocopy(nNewRanks);
1135 subMap_.resize_nocopy(nNewRanks);
1140 compactMaps.resize_nocopy(maps.
size());
1142 label constructi = 0;
1145 startOfLocal[mapi] = constructi;
1147 const label localRank = localRanks[mapi];
1149 if (!maps.
set(mapi) || localRank == -1)
1154 const auto& map = maps[mapi].constructMap()[localRank];
1157 const label nRemote = maps[mapi].constructSize()-map.
size();
1158 compactMaps[mapi].resize(2*nRemote);
1160 constructi += map.size();
1162 startOfLocal.
last() = constructi;
1182 labelList& myConstruct = constructMap_[myNewRank];
1187 const label localRank = localRanks[mapi];
1189 if (!maps.
set(mapi) || localRank == -1)
1194 const auto& map = maps[mapi].constructMap()[localRank];
1195 const label offset = startOfLocal[mapi];
1199 if (constructHasFlip_)
1205 myConstruct[constructi++] = map[i]-offset;
1209 myConstruct[constructi++] = map[i]+offset;
1215 myConstruct[constructi++] = map[i]+offset;
1220 if (constructi != startOfLocal.
last())
1223 <<
"constructi:" << constructi
1224 <<
" startOfLocal:" << startOfLocal.
last()
1235 const auto& oldRanks = newToOldRanks[myNewRank];
1239 label maxOldRank = -1;
1240 for (
const auto& elems : newToOldRanks)
1242 for (
const label el : elems)
1244 maxOldRank =
max(maxOldRank, el);
1250 labelList oldRankToMap(maxOldRank+1, -1);
1254 const label localRank = localRanks[mapi];
1255 if (localRank != -1)
1257 oldRankToMap[localRank] = mapi;
1264 if (!maps.
set(mapi) || localRanks[mapi] == -1)
1269 for (
const label oldRanki : oldRanks)
1276 if (oldRanki != localRanks[mapi])
1280 const auto& map = maps[mapi].constructMap()[oldRanki];
1290 const label sourceMapi = oldRankToMap[oldRanki];
1292 maps[sourceMapi].subMap()[localRanks[mapi]];
1301 if (map.size() !=
subMap.size())
1304 <<
"oldRanki:" << oldRanki
1306 <<
" constructMap:" << map.size()
1307 <<
" sourceMapi:" << sourceMapi
1308 <<
" subMap:" <<
subMap.size()
1312 const label offset = startOfLocal[sourceMapi];
1314 const label nMapLocal = startOfRemote[mapi][oldRanki];
1316 auto& cptMap = compactMaps[mapi];
1326 const label newIndex =
subMap[index-nMapLocal]+offset;
1332 !cptMap.insert(index, newIndex)
1333 && cptMap[index] != newIndex
1337 <<
"From oldRank:" << oldRanki
1338 <<
" on map:" << mapi
1339 <<
" at index:" << i
1340 <<
" have construct slot:" << index
1341 <<
" new index:" << newIndex
1342 <<
" but already have entry:" << cptMap[index]
1343 <<
" on for that slot"
1359 forAll(newToOldRanks, newRanki)
1361 if (newRanki != myNewRank)
1363 const auto& oldRanks = newToOldRanks[newRanki];
1368 if (!maps.
set(mapi))
1373 for (
const label oldRanki : oldRanks)
1379 allSize += maps[mapi].constructMap()[oldRanki].
size();
1383 labelList& myConstruct = constructMap_[newRanki];
1389 if (!maps.
set(mapi))
1394 for (
const label oldRanki : oldRanks)
1401 const auto& map = maps[mapi].constructMap()[oldRanki];
1403 const label nMapLocal = startOfRemote[mapi][oldRanki];
1404 SubList<label> slice(myConstruct, map.size(), allSize);
1406 if (constructHasFlip_)
1412 slice[i] = map[i]+nMapLocal-constructi;
1416 slice[i] = map[i]-nMapLocal+constructi;
1420 auto& cptMap = compactMaps[mapi];
1423 cptMap.insert(
mag(map[i])-1,
mag(slice[i])-1);
1430 slice[i] = map[i]-nMapLocal+constructi;
1431 compactMaps[mapi].insert(map[i], slice[i]);
1434 allSize += map.size();
1435 constructi += map.size();
1457 const label localRank = localRanks[mapi];
1459 if (!maps.
set(mapi) || localRank == -1)
1464 allSize += maps[mapi].subMap()[localRank].
size();
1472 const label localRank = localRanks[mapi];
1474 if (!maps.
set(mapi) || localRank == -1)
1479 const auto& map = maps[mapi].subMap()[localRank];
1480 SubList<label> slice(mySub, map.size(), allSize);
1488 slice[i] = map[i]-startOfLocal[mapi];
1492 slice[i] = map[i]+startOfLocal[mapi];
1500 slice[i] = map[i]+startOfLocal[mapi];
1503 allSize += map.size();
1507 forAll(newToOldRanks, newRanki)
1509 if (newRanki != myNewRank)
1511 const auto& oldRanks = newToOldRanks[newRanki];
1516 if (!maps.
set(mapi))
1521 for (
const label oldRanki : oldRanks)
1527 allSize += maps[mapi].subMap()[oldRanki].
size();
1535 for (
const label oldRanki : oldRanks)
1544 if (!maps.
set(mapi))
1549 const auto& map = maps[mapi].subMap()[oldRanki];
1550 SubList<label> slice(mySub, map.size(), allSize);
1557 slice[i] = map[i]-startOfLocal[mapi];
1561 slice[i] = map[i]+startOfLocal[mapi];
1569 slice[i] = map[i]+startOfLocal[mapi];
1572 allSize += map.size();
1579 constructSize_ = constructi;
1590 sizes[i] = subMap_[i].
size();
1601 sizes[i] = constructMap_[i].size();
1610 for (
const auto& list : subMap_)
1612 total += list.size();
1621 for (
const auto& list : constructMap_)
1623 total += list.size();
1633 constructMap_.clear();
1634 subHasFlip_ =
false;
1635 constructHasFlip_ =
false;
1637 schedulePtr_.reset(
nullptr);
1649 constructSize_ =
rhs.constructSize_;
1650 subMap_.transfer(
rhs.subMap_);
1651 constructMap_.transfer(
rhs.constructMap_);
1652 subHasFlip_ =
rhs.subHasFlip_;
1653 constructHasFlip_ =
rhs.constructHasFlip_;
1655 schedulePtr_.reset(
nullptr);
1657 rhs.constructSize_ = 0;
1658 rhs.subHasFlip_ =
false;
1659 rhs.constructHasFlip_ =
false;
1677 if (globalNumbering.
isLocal(myRank, globalI))
1679 return globalNumbering.
toLocal(myRank, globalI);
1683 label proci = globalNumbering.
whichProcID(myRank, globalI);
1684 label index = globalNumbering.
toLocal(proci, globalI);
1685 return compactMap[proci][index];
1699 constructSize_ =
rhs.constructSize_;
1700 subMap_ =
rhs.subMap_;
1701 constructMap_ =
rhs.constructMap_;
1702 subHasFlip_ =
rhs.subHasFlip_;
1703 constructHasFlip_ =
rhs.constructHasFlip_;
1705 schedulePtr_.reset(
nullptr);
Various functions to operate on Lists.
bool insert(const Key &key)
Insert a new entry, not overwriting existing entries.
List< Key > toc() const
The table of contents (the keys) in unsorted order.
static void recv(Type &value, const int fromProcNo, const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm, IOstreamOption::streamFormat fmt=IOstreamOption::BINARY)
Receive and deserialize a value. Uses operator>> for de-serialization.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void resize_nocopy(const label len)
Adjust allocated size of list without necessarily.
label push_uniq(const T &val)
Append an element if not already in the list.
void setSize(label n)
Alias for resize().
void resize(const label len)
Adjust allocated size of list.
static const List< T > & null() noexcept
Return a null List (reference to a nullObject). Behaves like an empty List.
A HashTable to objects of type <T> with a label key.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
static void exchange(const UList< Container > &sendBufs, const labelUList &recvSizes, List< Container > &recvBufs, const int tag=UPstream::msgType(), const int comm=UPstream::worldComm, const bool wait=true)
Helper: exchange contiguous data. Sends sendBufs, receives into recvBufs using predetermined receive ...
static void exchangeSizes(const labelUList &sendProcs, const labelUList &recvProcs, const Container &sendBufs, labelList &sizes, const int tag=UPstream::msgType(), const int comm=UPstream::worldComm)
Helper: exchange sizes of sendBufs for specified send/recv ranks.
A non-owning sub-view of a List (allocated or unallocated storage).
bool empty() const noexcept
True if List is empty (ie, size() is zero).
void size(const label n)
Older name for setAddressableSize.
T & last()
Access last element of the list, position [size()-1].
bool send()
Send buffer contents now and not in destructor [advanced usage]. Returns true on success.
Inter-processor communications stream.
static int myProcNo(const label communicator=worldComm)
Rank of this process in the communicator (starting from masterNo()). Negative if the process is not a...
commsTypes
Communications types.
@ scheduled
"scheduled" (MPI standard) : (MPI_Send, MPI_Recv)
static bool parRun(const bool on) noexcept
Set as parallel run on/off.
static int & msgType() noexcept
Message tag of standard messages.
static constexpr int masterNo() noexcept
Relative rank for the master process - is always 0.
static bool master(const label communicator=worldComm)
True if process corresponds to the master rank in the communicator.
static label nProcs(const label communicator=worldComm)
Number of ranks in parallel run (for given communicator). It is 1 for serial run.
static rangeType subProcs(const label communicator=worldComm)
Range of process indices for sub-processes.
@ broadcast
broadcast [MPI]
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
const T * set(const label i) const
Return const pointer to element (can be nullptr), or nullptr for out-of-range access (ie,...
label size() const noexcept
The number of entries in the list.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
unsigned int count(const bool on=true) const
Count number of bits set.
bitSet & unset(const bitSet &other)
Unset (subtract) the bits specified in the other bitset, which is a set difference corresponds to the...
Determines the order in which a set of processors should communicate with one another.
Calculates a non-overlapping list of offsets based on an input size (eg, number of cells) from differ...
label toLocal(const label proci, const label i) const
From global to local on proci.
label whichProcID(const label proci, const label i) const
Which processor does global id come from? Checks proci first (assumed to occur reasonably frequently)...
bool isLocal(const label proci, const label i) const
Is on processor proci.
label localSize(const label proci) const
Size of proci data.
Class containing processor-to-processor mapping information.
mapDistributeBase() noexcept
Default construct (uses worldComm).
void operator=(const mapDistributeBase &rhs)
Copy assignment.
const List< labelPair > & whichSchedule(const UPstream::commsTypes commsType) const
Return real or dummy schedule depending on the communication type.
const List< labelPair > & schedule() const
Return a schedule. Demand driven. See above.
void printLayout(Ostream &os) const
Debug: print layout. Can only be used on maps with sorted.
const labelListList & constructMap() const noexcept
From subsetted data to new reconstructed data.
void transfer(mapDistributeBase &rhs)
Transfer the contents of the argument and annul the argument.
static List< labelPair > schedule(const labelListList &subMap, const labelListList &constructMap, const int tag, const label comm=UPstream::worldComm)
Calculate a communication schedule. See above.
bool constructHasFlip() const noexcept
Does constructMap include a sign.
const labelListList & subMap() const noexcept
From subsetted data back to original data.
void calcCompactAddressing(const globalIndex &globalNumbering, const labelUList &elements, List< Map< label > > &compactMap) const
Construct per processor compact addressing of the global elements.
static void checkReceivedSize(const label proci, const label expectedSize, const label receivedSize)
Fatal if expected != received size.
bool subHasFlip() const noexcept
Does subMap include a sign.
labelList constructMapSizes() const
The sizes of the constructMap lists.
void exchangeAddressing(const int tag, const globalIndex &globalNumbering, labelList &elements, List< Map< label > > &compactMap, labelList &compactStart)
static label renumber(const globalIndex &, const label comm, const List< Map< label > > &compactMap, const label globalElement)
Helper for construct from globalIndex. Renumbers element.
labelList subMapSizes() const
The sizes of the subMap lists.
static label countUnmapped(const labelUList &elements, const labelListList &maps, const bool hasFlip)
Count the number of unmapped elements.
static label getMappedSize(const labelListList &maps, const bool hasFlip)
Scan the maps for the max addressed index.
label comm() const noexcept
The communicator used.
void clear()
Reset to zero size, only retaining communicator.
static bool hasFlipAddressing(const labelUList &map)
Test for flip addressing, where flips are encoded as negative indices and non-flips are encoded as po...
label subMapTotalSize() const noexcept
The sum of the subMap list sizes.
label constructMapTotalSize() const noexcept
The sum of the constructMap list sizes.
layoutTypes
The map layout (eg, of the constructMap).
@ linear
In processor-order.
label constructSize() const noexcept
Constructed data size.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
A HashTable to objects of type <T> with a labelPair key. The hashing is based on labelPair (FixedList...
Namespace for handling debugging switches.
Pair< label > labelPair
A pair of labels.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
List< labelList > labelListList
List of labelList.
List< label > labelList
A List of labels.
IntListType renumber(const labelUList &oldToNew, const IntListType &input)
Renumber the values within a list.
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
Global flatOutput() function with specified output delimiters.
labelList identity(const label len, label start=0)
Return an identity map of the given length with (map[i] == i), works like std::iota() but returning a...
errorManip< error > abort(error &err)
void rhs(fvMatrix< typename Expr::value_type > &m, const Expr &expression)
static constexpr const zero Zero
Global zero (0).
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
errorManipArg< error, int > exit(error &err, const int errNo=1)
UList< label > labelUList
A UList of labels.
HashSet< labelPair, Foam::Hash< labelPair > > labelPairHashSet
A HashSet for a labelPair. The hashing is based on labelPair (FixedList) and is thus non-commutative.
constexpr char nl
The newline '\n' character (0x0a).
#define forAll(list, i)
Loop across all elements in list.
#define forAllIters(container, iter)
Iterate across all elements in the container object.