46bool Foam::refinementHistory::readIOcontents()
59void Foam::refinementHistory::writeEntry
62 const splitCell8&
split
66 if (
split.addedCellsPtr_)
69 <<
" subCells:" <<
split.addedCellsPtr_()
79 if (
split.parent_ >= 0)
83 string oldPrefix =
Pout.prefix();
84 Pout.prefix() =
" " + oldPrefix;
85 writeEntry(splitCells, splitCells[
split.parent_]);
86 Pout.prefix() = oldPrefix;
97 string oldPrefix =
Pout.prefix();
100 forAll(visibleCells, celli)
102 label index = visibleCells[celli];
106 Pout<<
"Cell from refinement:" << celli <<
" index:" << index
109 string oldPrefix =
Pout.prefix();
110 Pout.prefix() =
" " + oldPrefix;
111 writeEntry(splitCells, splitCells[index]);
112 Pout.prefix() = oldPrefix;
116 Pout<<
"Unrefined cell:" << celli <<
" index:" << index <<
endl;
119 Pout.prefix() = oldPrefix;
165 parent_ =
rhs.parent_;
166 addedCellsPtr_.reset(
rhs.addedCellsPtr_.clone());
170bool Foam::refinementHistory::splitCell8::operator==
172 const splitCell8&
rhs
176 if (parent_ !=
rhs.parent_)
180 if (
bool(addedCellsPtr_) !=
bool(
rhs.addedCellsPtr_))
184 else if (addedCellsPtr_)
193bool Foam::refinementHistory::splitCell8::operator!=
195 const splitCell8&
rhs
208 is >> sc.parent_ >> addedCells;
210 if (addedCells.size())
212 sc.addedCellsPtr_.reset(
new FixedList<label, 8>(addedCells));
216 sc.addedCellsPtr_.reset(
nullptr);
223Foam::Ostream& Foam::operator<<
226 const refinementHistory::splitCell8& sc
235 if (sc.addedCellsPtr_)
237 labels = sc.addedCellsPtr_();
246void Foam::refinementHistory::checkIndices()
const
251 if (visibleCells_[i] < 0 && visibleCells_[i] >= splitCells_.size())
254 <<
"Illegal entry " << visibleCells_[i]
255 <<
" in visibleCells at location" << i <<
nl
256 <<
"It points outside the range of splitCells : 0.."
257 << splitCells_.size()-1
264Foam::label Foam::refinementHistory::allocateSplitCell
272 if (freeSplitCells_.size())
274 index = freeSplitCells_.back();
275 freeSplitCells_.pop_back();
281 index = splitCells_.size();
289 splitCell8& parentSplit = splitCells_[parent];
291 if (!parentSplit.addedCellsPtr_)
294 parentSplit.addedCellsPtr_.reset(
new FixedList<label, 8>(-1));
301 parentSplits[i] = index;
308void Foam::refinementHistory::freeSplitCell(
const label index)
313 if (
split.parent_ >= 0)
315 autoPtr<FixedList<label, 8>>& subCellsPtr =
316 splitCells_[
split.parent_].addedCellsPtr_;
320 FixedList<label, 8>& subCells = subCellsPtr();
322 label myPos = subCells.find(index);
327 <<
"Problem: cannot find myself in"
332 subCells[myPos] = -1;
341 freeSplitCells_.append(index);
345void Foam::refinementHistory::markSplit
349 DynamicList<splitCell8>& newSplitCells
352 if (oldToNew[index] == -1)
358 oldToNew[index] = newSplitCells.size();
359 newSplitCells.append(
split);
361 if (
split.parent_ >= 0)
363 markSplit(
split.parent_, oldToNew, newSplitCells);
365 if (
split.addedCellsPtr_)
367 const FixedList<label, 8>& splits =
split.addedCellsPtr_();
373 markSplit(splits[i], oldToNew, newSplitCells);
381void Foam::refinementHistory::mark
388 splitToVal[index] = val;
392 if (
split.addedCellsPtr_)
394 const FixedList<label, 8>& splits =
split.addedCellsPtr_();
400 mark(val, splits[i], splitToVal);
407Foam::label Foam::refinementHistory::markCommonCells
414 labelList splitToCluster(splitCells_.size(), -1);
417 forAll(visibleCells_, cellI)
419 label index = visibleCells_[cellI];
424 while (splitCells_[index].parent_ != -1)
426 index = splitCells_[index].parent_;
430 if (splitToCluster[index] == -1)
432 mark(clusterI, index, splitToCluster);
439 cellToCluster.setSize(visibleCells_.size(), -1);
441 forAll(visibleCells_, cellI)
443 label index = visibleCells_[cellI];
447 cellToCluster[cellI] = splitToCluster[index];
458 PtrList<labelList>& specifiedProcessorFaces,
460 List<labelPair>& explicitConnections
463 const polyMesh&
mesh =
dynamic_cast<const polyMesh&
>(
db());
465 blockedFace.setSize(
mesh.nFaces(),
true);
469 markCommonCells(cellToCluster);
474 label nUnblocked = 0;
478 label ownCluster = cellToCluster[
mesh.faceOwner()[faceI]];
479 label neiCluster = cellToCluster[
mesh.faceNeighbour()[faceI]];
481 if (ownCluster != -1 && ownCluster == neiCluster)
483 if (blockedFace[faceI])
485 blockedFace[faceI] =
false;
491 if (refinementHistory::debug)
504 const PtrList<labelList>& specifiedProcessorFaces,
506 const List<labelPair>& explicitConnections,
510 const polyMesh&
mesh =
dynamic_cast<const polyMesh&
>(
db());
514 label nClusters = markCommonCells(cellToCluster);
525 label own =
mesh.faceOwner()[faceI];
526 label nei =
mesh.faceNeighbour()[faceI];
528 label ownCluster = cellToCluster[own];
529 label neiCluster = cellToCluster[nei];
531 if (ownCluster != -1 && ownCluster == neiCluster)
533 if (clusterToProc[ownCluster] == -1)
535 clusterToProc[ownCluster] = decomposition[own];
538 if (decomposition[own] != clusterToProc[ownCluster])
540 decomposition[own] = clusterToProc[ownCluster];
543 if (decomposition[nei] != clusterToProc[ownCluster])
545 decomposition[nei] = clusterToProc[ownCluster];
551 if (refinementHistory::debug)
553 Info<<
type() <<
" : changed decomposition on "
578 Pout<<
"refinementHistory::refinementHistory :"
579 <<
" constructed history from IOobject :"
580 <<
" splitCells:" << splitCells_.size()
581 <<
" visibleCells:" << visibleCells_.size()
582 <<
" active:" << active_
591 const List<splitCell8>& splitCells,
598 splitCells_(splitCells),
600 visibleCells_(visibleCells)
612 Pout<<
"refinementHistory::refinementHistory :"
613 <<
" constructed history from IOobject or components :"
614 <<
" splitCells:" << splitCells_.size()
615 <<
" visibleCells:" << visibleCells_.size()
616 <<
" active:" << active_
635 if (!readIOcontents())
638 splitCells_.setCapacity(nCells);
640 for (label cellI = 0; cellI < nCells; cellI++)
642 visibleCells_[cellI] = cellI;
643 splitCells_.append(splitCell8());
655 Pout<<
"refinementHistory::refinementHistory :"
656 <<
" constructed history from IOobject or initial size :"
657 <<
" splitCells:" << splitCells_.size()
658 <<
" visibleCells:" << visibleCells_.size()
659 <<
" active:" << active_
680 if (!readIOcontents())
683 splitCells_.setCapacity(nCells);
685 for (label celli = 0; celli < nCells; celli++)
687 visibleCells_[celli] = celli;
688 splitCells_.append(splitCell8());
697 Pout<<
"refinementHistory::refinementHistory :"
698 <<
" constructed history from IOobject or initial size :"
699 <<
" splitCells:" << splitCells_.size()
700 <<
" visibleCells:" << visibleCells_.size()
701 <<
" active:" << active_
710 const refinementHistory& rh
715 splitCells_(rh.splitCells()),
716 freeSplitCells_(rh.freeSplitCells()),
717 visibleCells_(rh.visibleCells())
721 Pout<<
"refinementHistory::refinementHistory : constructed initial"
722 <<
" history." <<
endl;
730 const UPtrList<const labelList>& cellMaps,
731 const UPtrList<const refinementHistory>& refs
740 <<
"Read option MUST_READ, READ_IF_PRESENT or READ_MODIFIED"
741 <<
" suggests that a read constructor would be more appropriate."
745 const polyMesh&
mesh =
dynamic_cast<const polyMesh&
>(
db());
753 const DynamicList<splitCell8>& subSplits = refs[refI].splitCells();
754 offsets[refI+1] = offsets[refI]+subSplits.size();
758 splitCells_.setSize(offsets.last());
761 const DynamicList<splitCell8>& subSplits = refs[refI].splitCells();
764 splitCell8& newSplit = splitCells_[offsets[refI]+i];
767 newSplit = subSplits[i];
770 if (newSplit.parent_ >= 0)
772 newSplit.parent_ += offsets[refI];
775 if (newSplit.addedCellsPtr_)
777 FixedList<label, 8>& splits = newSplit.addedCellsPtr_();
783 splits[i] += offsets[refI];
792 visibleCells_.setSize(
mesh.nCells(), -1);
795 const labelList& cellMap = cellMaps[refI];
796 const labelList& subVis = refs[refI].visibleCells();
800 label& newVis = visibleCells_[cellMap[i]];
805 newVis += offsets[refI];
828 Pout<<
"refinementHistory::refinementHistory :"
829 <<
" constructed history from multiple refinementHistories :"
830 <<
" splitCells:" << splitCells_.size()
831 <<
" visibleCells:" << visibleCells_.size()
851 Pout<<
"refinementHistory::refinementHistory :"
852 <<
" constructed history from Istream"
853 <<
" splitCells:" << splitCells_.size()
854 <<
" visibleCells:" << visibleCells_.
size()
878 oldToNewSplit.setSize(splitCells_.size());
882 DynamicList<splitCell8> newSplitCells(splitCells_.size());
887 forAll(splitCells_, index)
889 if (splitCellProc[index] == procI && splitCellNum[index] == 8)
892 oldToNewSplit[index] = newSplitCells.size();
893 newSplitCells.append(splitCells_[index]);
898 forAll(visibleCells_, cellI)
900 label index = visibleCells_[cellI];
902 if (index >= 0 && decomposition[cellI] == procI)
904 label parent = splitCells_[index].parent_;
907 oldToNewSplit[index] = newSplitCells.size();
908 newSplitCells.append(splitCell8(parent));
918 newSplitCells.shrink();
921 forAll(newSplitCells, index)
923 splitCell8&
split = newSplitCells[index];
925 if (
split.parent_ >= 0)
929 if (
split.addedCellsPtr_)
937 splits[i] = oldToNewSplit[splits[i]];
946 forAll(decomposition, cellI)
948 if (decomposition[cellI] == procI)
957 forAll(visibleCells_, cellI)
959 if (decomposition[cellI] == procI)
961 label index = visibleCells_[cellI];
964 index = oldToNewSplit[index];
966 newVisibleCells[nSub++] = index;
995 decomposition[cellMap[i]] = 1;
1000 labelList splitCellProc(splitCells_.size(), -1);
1005 forAll(visibleCells_, cellI)
1007 label index = visibleCells_[cellI];
1013 splitCells_[index].parent_,
1014 decomposition[cellI],
1050 label oldSize = visibleCells_.size();
1054 Pout<<
"refinementHistory::resize from " << oldSize <<
" to " << size
1055 <<
" cells" <<
endl;
1058 visibleCells_.setSize(size);
1061 for (label i = oldSize; i < visibleCells_.size(); i++)
1063 visibleCells_[i] = -1;
1072 const labelList& reverseCellMap = map.reverseCellMap();
1076 labelList newVisibleCells(map.cellMap().size(), -1);
1078 forAll(visibleCells_, celli)
1080 if (visibleCells_[celli] != -1)
1082 label index = visibleCells_[celli];
1085 if (splitCells_[index].addedCellsPtr_)
1091 label newCelli = reverseCellMap[celli];
1095 newVisibleCells[newCelli] = index;
1102 Pout<<
"refinementHistory::updateMesh : from "
1103 << visibleCells_.size()
1104 <<
" to " << newVisibleCells.size()
1105 <<
" cells" <<
endl;
1108 visibleCells_.transfer(newVisibleCells);
1122 labelList newVisibleCells(cellMap.size(), -1);
1124 forAll(newVisibleCells, celli)
1126 label oldCelli = cellMap[celli];
1128 label index = visibleCells_[oldCelli];
1131 if (index >= 0 && splitCells_[index].addedCellsPtr_)
1137 newVisibleCells[celli] = index;
1142 Pout<<
"refinementHistory::updateMesh : from "
1143 << visibleCells_.size()
1144 <<
" to " << newVisibleCells.size()
1145 <<
" cells" <<
endl;
1148 visibleCells_.transfer(newVisibleCells);
1153void Foam::refinementHistory::countProc
1156 const label newProcNo,
1161 if (splitCellProc[index] != newProcNo)
1165 splitCellProc[index] = newProcNo;
1166 splitCellNum[index] = 1;
1170 splitCellNum[index]++;
1173 if (splitCellNum[index] == 8)
1177 Pout<<
"Moving " << splitCellNum[index]
1178 <<
" cells originating from cell " << index
1180 <<
" to processor " << splitCellProc[index]
1184 label parent = splitCells_[index].parent_;
1188 countProc(parent, newProcNo, splitCellProc, splitCellNum);
1228 labelList destination(visibleCells_.size());
1232 forAll(subCellMap, proci)
1234 const labelList& newToOld = subCellMap[proci];
1238 label oldCelli = newToOld[i];
1240 destination[oldCelli] = proci;
1245 labelList splitCellProc(splitCells_.size(), -1);
1249 forAll(visibleCells_, celli)
1251 label index = visibleCells_[celli];
1257 splitCells_[index].parent_,
1282 labelList oldToNew(splitCells_.size(), -1);
1290 forAll(splitCells_, index)
1292 if (splitCellProc[index] == proci && splitCellNum[index] == 8)
1295 oldToNew[index] = newSplitCells.size();
1296 newSplitCells.append(splitCells_[index]);
1301 forAll(visibleCells_, celli)
1303 label index = visibleCells_[celli];
1305 if (index >= 0 && destination[celli] == proci)
1307 label parent = splitCells_[index].parent_;
1310 oldToNew[index] = newSplitCells.size();
1311 newSplitCells.append(splitCell8(parent));
1321 newSplitCells.shrink();
1324 forAll(newSplitCells, index)
1326 splitCell8&
split = newSplitCells[index];
1328 if (
split.parent_ >= 0)
1332 if (
split.addedCellsPtr_)
1340 splits[i] = oldToNew[splits[i]];
1347 const labelList& subMap = subCellMap[proci];
1350 labelList newVisibleCells(subMap.size(), -1);
1354 label oldCelli = subMap[newCelli];
1356 label oldIndex = visibleCells_[oldCelli];
1360 newVisibleCells[newCelli] = oldToNew[oldIndex];
1371 toNbr << newSplitCells << newVisibleCells;
1376 pBufs.finishedSends();
1383 splitCells_.clear();
1403 label offset = splitCells_.size();
1408 forAll(newSplitCells, index)
1410 splitCell8&
split = newSplitCells[index];
1412 if (
split.parent_ >= 0)
1414 split.parent_ += offset;
1416 if (
split.addedCellsPtr_)
1424 splits[i] += offset;
1429 splitCells_.append(
split);
1434 const labelList& constructMap = map.cellMap().constructMap()[proci];
1436 forAll(newVisibleCells, i)
1438 if (newVisibleCells[i] >= 0)
1440 visibleCells_[constructMap[i]] = newVisibleCells[i] + offset;
1444 splitCells_.shrink();
1456 Pout<<
"refinementHistory::compact() Entering with:"
1457 <<
" freeSplitCells_:" << freeSplitCells_.size()
1458 <<
" splitCells_:" << splitCells_.size()
1459 <<
" visibleCells_:" << visibleCells_.size()
1463 forAll(freeSplitCells_, i)
1465 label index = freeSplitCells_[i];
1467 if (splitCells_[index].parent_ != -2)
1470 <<
"Problem index:" << index
1476 forAll(visibleCells_, celli)
1480 visibleCells_[celli] >= 0
1481 && splitCells_[visibleCells_[celli]].parent_ == -2
1485 <<
"Problem : visible cell:" << celli
1491 DynamicList<splitCell8> newSplitCells(splitCells_.size());
1494 labelList oldToNew(splitCells_.size(), -1);
1500 forAll(visibleCells_, celli)
1502 label index = visibleCells_[celli];
1510 splitCells_[index].parent_ != -1
1511 || splitCells_[index].addedCellsPtr_
1514 markSplit(index, oldToNew, newSplitCells);
1520 forAll(splitCells_, index)
1522 if (splitCells_[index].parent_ == -2)
1528 splitCells_[index].parent_ == -1
1529 && !splitCells_[index].addedCellsPtr_
1538 markSplit(index, oldToNew, newSplitCells);
1546 forAll(newSplitCells, index)
1548 splitCell8&
split = newSplitCells[index];
1550 if (
split.parent_ >= 0)
1554 if (
split.addedCellsPtr_)
1562 splits[i] = oldToNew[splits[i]];
1571 Pout<<
"refinementHistory::compact : compacted splitCells from "
1572 << splitCells_.size() <<
" to " << newSplitCells.size() <<
endl;
1575 splitCells_.transfer(newSplitCells);
1576 freeSplitCells_.clearStorage();
1581 Pout<<
"refinementHistory::compact() NOW:"
1582 <<
" freeSplitCells_:" << freeSplitCells_.size()
1583 <<
" splitCells_:" << splitCells_.size()
1584 <<
" newSplitCells:" << newSplitCells.size()
1585 <<
" visibleCells_:" << visibleCells_.size()
1591 forAll(visibleCells_, celli)
1593 label index = visibleCells_[celli];
1598 visibleCells_[celli] = oldToNew[index];
1610 writeDebug(visibleCells_, splitCells_);
1620 label parentIndex = -1;
1622 if (visibleCells_[celli] != -1)
1627 parentIndex = visibleCells_[celli];
1631 visibleCells_[celli] = -1;
1636 parentIndex = allocateSplitCell(-1, -1);
1643 label addedCelli = addedCells[i];
1647 visibleCells_[addedCelli] = allocateSplitCell(
parentIndex, i);
1654 const label masterCelli,
1659 label parentIndex = splitCells_[visibleCells_[masterCelli]].parent_;
1664 label celli = combinedCells[i];
1666 freeSplitCell(visibleCells_[celli]);
1667 visibleCells_[celli] = -1;
1678 bool ok = readData(readStream(
typeName));
1707 mesh.facesInstance(),
1713 if (topoSet::debug)
DebugVar(setsDir);
1726 rh.freeSplitCells_.clearStorage();
1728 is >> rh.splitCells_ >> rh.visibleCells_;
1739 const_cast<refinementHistory&
>(rh).compact();
1741 return os <<
"// splitCells" <<
nl
1742 << rh.splitCells_ <<
nl
1743 <<
"// visibleCells" <<
nl
1744 << rh.visibleCells_;
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
void transfer(List< T > &list)
Transfer contents of the argument List into this.
void setSize(const label n)
Alias for resize().
void append(const T &val)
Copy append an element to the end of this list.
void clearStorage()
Clear the list and delete storage.
DynamicList< T, SizeMin > & shrink()
Calls shrink_to_fit() and returns a reference to the DynamicList.
A 1D vector of objects of type <T> with a fixed length <N>.
bool isReadOptional() const noexcept
True if (LAZY_READ) bits are set [same as READ_IF_PRESENT].
bool isReadRequired() const noexcept
True if (MUST_READ | READ_MODIFIED) bits are set.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
void warnNoRereading() const
Helper: warn that type does not support re-reading.
const objectRegistry & db() const noexcept
Return the local objectRegistry.
autoPtr< IOobject > clone() const
Clone.
bool bad() const noexcept
True if stream is corrupted.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void setSize(label n)
Alias for resize().
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Buffers for inter-processor communications streams (UOPstream, UIPstream).
void finishedSends(const bool wait=true)
Mark the send phase as being finished.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Input inter-processor communications stream using MPI send/recv etc. - operating on external buffer.
void size(const label n)
Older name for setAddressableSize.
T & last()
Access last element of the list, position [size()-1].
Output inter-processor communications stream using MPI send/recv etc. - operating on external buffer.
static int myProcNo(const label communicator=worldComm)
Rank of this process in the communicator (starting from masterNo()). Negative if the process is not a...
static bool parRun(const bool on) noexcept
Set as parallel run on/off.
static rangeType allProcs(const label communicator=worldComm)
Range of process indices for all processes.
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
label size() const noexcept
The number of entries in the list.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A class for handling file names.
const labelListList & constructMap() const noexcept
From subsetted data to new reconstructed data.
const labelListList & subMap() const noexcept
From subsetted data back to original data.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
const mapDistribute & cellMap() const noexcept
Cell distribute map.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
const labelList & reverseCellMap() const noexcept
Reverse cell map.
const labelList & cellMap() const noexcept
Old cell map.
Mesh consisting of general polyhedral cells.
static word meshSubDir
Return the mesh sub-directory name (usually "polyMesh").
label nCells() const noexcept
Number of mesh cells.
splitCell8()
Default construct (parent = -1).
autoPtr< FixedList< label, 8 > > addedCellsPtr_
Cells this cell was refined into.
void operator=(const splitCell8 &rhs)
Copy assignment (no autoPtr stealing).
All refinement history. Used in unrefinement.
void compact()
Compact splitCells_. Removes all freeSplitCells_ elements.
label parentIndex(const label celli) const
Get parent of cell.
void writeDebug() const
Debug write.
static void removeFiles(const polyMesh &)
Helper: remove all sets files from mesh instance.
virtual bool writeData(Ostream &) const
WriteData function required for regIOobject write operation.
void storeSplit(const label celli, const labelList &addedCells)
Store splitting of cell into 8.
void apply(const boolList &blockedFace, const PtrList< labelList > &specifiedProcessorFaces, const labelList &specifiedProcessor, const List< labelPair > &explicitConnections, labelList &decomposition) const
Apply any additional post-decomposition constraints.
void add(boolList &blockedFace, PtrList< labelList > &specifiedProcessorFaces, labelList &specifiedProcessor, List< labelPair > &explicitConnections) const
Add my decomposition constraints.
const DynamicList< splitCell8 > & splitCells() const
Storage for splitCell8s.
void distribute(const mapDistributePolyMesh &)
Update local numbering for mesh redistribution.
const DynamicList< label > & freeSplitCells() const
Cache of unused indices in splitCells.
void resize(const label nCells)
Extend/shrink storage. additional visibleCells_ elements get.
refinementHistory(const IOobject &)
Construct (read) given an IOobject.
virtual bool readData(Istream &)
ReadData function required for regIOobject read operation. Note:
autoPtr< refinementHistory > clone(const IOobject &io, const labelList &decomposition, const labelList &splitCellProc, const labelList &splitCellNum, const label procI, labelList &oldToNewSplit) const
Low level clone.
void updateMesh(const mapPolyMesh &)
Update numbering for mesh changes.
const labelList & visibleCells() const
Per cell in the current mesh (i.e. visible) either -1 (unrefined) or an index into splitCells.
bool active() const
Is there unrefinement history?
void subset(const labelList &pointMap, const labelList &faceMap, const labelList &cellMap)
Update numbering for subsetting.
virtual bool read()
Read object. If global number of visible cells > 0 becomes active.
void combineCells(const label masterCelli, const labelList &combinedCells)
Store combining 8 cells into master.
void close()
Close Istream.
regIOobject(const IOobject &io, const bool isTimeObject=false)
Construct from IOobject. The optional flag adds special handling if the object is the top-level regIO...
bool headerOk()
Read and check header info. Does not check the headerClassName.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
static bool split(const std::string &line, std::string &key, std::string &val)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
#define DebugVar(var)
Report a variable name and value.
Namespace for handling debugging switches.
bool rm(const fileName &file)
Remove a file (or its gz equivalent), returning true if successful.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
bool returnReduceOr(const bool value, const int communicator=UPstream::worldComm)
Perform logical (or) MPI Allreduce on a copy. Uses UPstream::reduceOr.
List< labelList > labelListList
List of labelList.
bool exists(const fileName &name, const bool checkGzip=true, const bool followLink=true)
Does the name exist (as DIRECTORY or FILE) in the file system?
List< label > labelList
A List of labels.
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 & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces).
T returnReduce(const T &value, BinaryOp bop, const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm)
Perform reduction on a copy, using specified binary operation.
const word GlobalIOList< Tuple2< scalar, vector > >::typeName("scalarVectorTable")
Ostream & endl(Ostream &os)
Add newline and flush stream.
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
Istream & operator>>(Istream &, directionInfo &)
errorManip< error > abort(error &err)
List< bool > boolList
A List of bools.
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.
UList< label > labelUList
A UList of labels.
constexpr char nl
The newline '\n' character (0x0a).
#define forAll(list, i)
Loop across all elements in list.