55 if (u[facei] < l[facei])
58 <<
"Reversed face. Problem at face " << facei
59 <<
" l:" << l[facei] <<
" u:" << u[facei]
62 if (l[facei] < 0 || u[facei] < 0 || u[facei] >=
size)
65 <<
"Illegal cell label. Problem at face " << facei
66 <<
" l:" << l[facei] <<
" u:" << u[facei]
71 for (label facei=1; facei < l.
size(); ++facei)
73 if (l[facei-1] > l[facei])
76 <<
"Lower not in incremental cell order."
77 <<
" Problem at face " << facei
78 <<
" l:" << l[facei] <<
" u:" << u[facei]
79 <<
" previous l:" << l[facei-1]
82 else if (l[facei-1] == l[facei])
85 if (u[facei-1] > u[facei])
88 <<
"Upper not in incremental cell order."
89 <<
" Problem at face " << facei
90 <<
" l:" << l[facei] <<
" u:" << u[facei]
91 <<
" previous u:" << u[facei-1]
115 globalNumbering.localStart(myProci)
127 if (interfaces.set(inti))
129 interfaces[inti].initInternalFieldTransfer
141 if (interfaces.set(inti))
148 interfaces[inti].internalFieldTransfer
177 if (interfaces.set(inti))
179 for (
const label celli : interfaces[inti].
faceCells())
193 cellCells[celli].setSize(nNbrs[celli], -1);
202 const label c0 = own[facei];
203 const label
c1 = nbr[facei];
205 cellCells[c0][nNbrs[c0]++] = globalIndices[
c1];
206 cellCells[
c1][nNbrs[
c1]++] = globalIndices[c0];
210 if (interfaces.set(inti))
217 cellCells[c0][nNbrs[c0]++] = nbrGlobalCells[inti][facei];
226Foam::label Foam::lduPrimitiveMesh::totalSize
235 size += msh.lduAddr().size();
253 if (upper[facei] < lower[facei])
256 <<
"Problem at face:" << facei
257 <<
" lower:" << lower[facei]
258 <<
" upper:" << upper[facei]
261 nNbrs[
lower[facei]]++;
269 offsets[celli+1] = offsets[celli]+nNbrs[celli];
277 const label celli =
lower[facei];
278 cellToFaces[nNbrs[celli]++] = facei;
290 for (label celli = 0; celli < nCells; ++celli)
292 const label startOfCell = offsets[celli];
293 const label nNbr = offsets[celli+1] - startOfCell;
300 nbr[i] =
upper[cellToFaces[offsets[celli]+i]];
304 for (
const label index : order)
306 oldToNew[cellToFaces[startOfCell + index]] = newFacei++;
314Foam::label Foam::lduPrimitiveMesh::findConnectedInterface
320 const label nbrProci,
326 for (
const auto& procAndInterface : procAndInterfaces)
328 const label proci = procAndInterface[0];
330 if (proci == nbrProci)
332 const label interfacei = procAndInterface[1];
343 interfaces[interfacei]
346 if (pldui.neighbProcNo() == myRank)
348 nbrInti = procAndInterface[1];
366Foam::lduPrimitiveMesh::lduPrimitiveMesh
375 lduAddressing(nCells),
376 lowerAddr_(l, reuse),
377 upperAddr_(u, reuse),
380 if (debug && lowerAddr_.
size())
382 if (max(lowerAddr_) >= nCells || min(lowerAddr_) < 0)
384 FatalErrorInFunction <<
"Illegal lower addressing."
385 <<
" nCells:" << nCells
386 <<
" max(lower):" << max(lowerAddr_)
387 <<
" min(lower):" << min(lowerAddr_)
391 if (
debug && upperAddr_.size())
393 if (max(upperAddr_) >= nCells || min(upperAddr_) < 0)
395 FatalErrorInFunction <<
"Illegal upper addressing."
396 <<
" nCells:" << nCells
397 <<
" max(upper):" << max(upperAddr_)
398 <<
" min(upper):" << min(upperAddr_)
411 interfaces_ = interfaces;
415 primitiveInterfaces_.setSize(interfaces_.size());
418 if (interfaces_.set(i))
420 primitiveInterfaces_.set(i, &interfaces_[i]);
426Foam::lduPrimitiveMesh::lduPrimitiveMesh
436Foam::lduPrimitiveMesh::lduPrimitiveMesh
449 primitiveInterfaces_(),
455 if (max(lowerAddr_) >= nCells || min(lowerAddr_) < 0)
457 FatalErrorInFunction <<
"Illegal lower addressing."
458 <<
" nCells:" << nCells
459 <<
" max(lower):" << max(lowerAddr_)
460 <<
" min(lower):" << min(lowerAddr_)
464 if (debug && upperAddr_.size())
466 if (max(upperAddr_) >= nCells || min(upperAddr_) < 0)
468 FatalErrorInFunction <<
"Illegal upper addressing."
469 <<
" nCells:" << nCells
470 <<
" max(upper):" << max(upperAddr_)
471 <<
" min(upper):" << min(upperAddr_)
477 primitiveInterfaces_.transfer(primitiveInterfaces);
480 interfaces_.setSize(primitiveInterfaces_.size());
481 forAll(primitiveInterfaces_, i)
483 if (primitiveInterfaces_.set(i))
485 interfaces_.set(i, &primitiveInterfaces_[i]);
491Foam::lduPrimitiveMesh::lduPrimitiveMesh
507 lduAddressing(myMesh.lduAddr().size() + totalSize(otherMeshes)),
510 const label currentComm = myMesh.comm();
514 if (otherMeshes[i].
comm() != currentComm)
517 <<
"Communicator " << otherMeshes[i].comm()
519 <<
" differs from that of predecessor "
525 const label nMeshes = otherMeshes.
size()+1;
528 if (lduPrimitiveMesh::debug)
531 <<
" agglomerating into " << myAgglom
532 <<
" as are " <<
findIndices(procAgglomMap, myAgglom)
540 if (procAgglomMap[procIDs[i]] != procAgglomMap[procIDs[0]])
543 <<
"Processor " << procIDs[i]
544 <<
" agglomerates to " << procAgglomMap[procIDs[i]]
545 <<
" whereas other processors " << procIDs
546 <<
" agglomerate to "
554 cellOffsets.
setSize(nMeshes+1);
556 for (label procMeshI = 0; procMeshI < nMeshes; ++procMeshI)
558 const lduMesh& procMesh =
mesh(myMesh, otherMeshes, procMeshI);
560 cellOffsets[procMeshI+1] =
561 cellOffsets[procMeshI]
562 + procMesh.lduAddr().size();
567 labelList internalFaceOffsets(nMeshes+1);
568 internalFaceOffsets[0] = 0;
569 for (label procMeshI = 0; procMeshI < nMeshes; ++procMeshI)
571 const lduMesh& procMesh =
mesh(myMesh, otherMeshes, procMeshI);
573 internalFaceOffsets[procMeshI+1] =
574 internalFaceOffsets[procMeshI]
575 + procMesh.lduAddr().lowerAddr().size();
584 EdgeMap<labelPairList> mergedMap(2*myInterfaces.size());
589 EdgeMap<labelPairList> unmergedMap(mergedMap.size());
593 List<DynamicList<label>> procToGlobal(nMeshes);
596 boundaryMap.setSize(nMeshes);
597 boundaryFaceMap.setSize(nMeshes);
602 for (label procMeshI = 0; procMeshI < nMeshes; ++procMeshI)
605 mesh(myMesh, otherMeshes, procMeshI).interfaces();
608 boundaryMap[procMeshI].setSize(
interfaces.size(), -1);
609 boundaryFaceMap[procMeshI].setSize(
interfaces.size());
623 <<
"At mesh from processor " << procIDs[procMeshI]
624 <<
" have interface " << intI
625 <<
" of unhandled type " << ldui.type()
626 <<
". Adapt decomposition to avoid these"
630 const processorLduInterface& pldui =
633 label agglom0 = procAgglomMap[pldui.myProcNo()];
634 label agglom1 = procAgglomMap[pldui.neighbProcNo()];
636 const edge procEdge(agglom0, agglom1);
638 if (agglom0 != myAgglom && agglom1 != myAgglom)
641 <<
"At mesh from processor " << procIDs[procMeshI]
642 <<
" have interface " << intI
643 <<
" with myProcNo:" << pldui.myProcNo()
644 <<
" with neighbProcNo:" << pldui.neighbProcNo()
647 else if (agglom0 == myAgglom && agglom1 == myAgglom)
652 Pout<<
"merged proc interface: myProcNo:"
654 <<
" nbr:" << pldui.neighbProcNo()
655 <<
" size:" << ldui.faceCells().size()
659 const label nbrProcMeshI =
660 procIDs.find(pldui.neighbProcNo());
662 if (procMeshI < nbrProcMeshI)
665 nCoupledFaces[procMeshI] += ldui.faceCells().size();
668 mergedMap(procEdge).append
677 Pout<<
"external proc interface: myProcNo:"
679 <<
" nbr:" << pldui.neighbProcNo()
680 <<
" size:" << ldui.faceCells().size()
684 unmergedMap(procEdge).append
693 procToGlobal[procMeshI].append(intI);
703 const auto& global0 = procToGlobal[0];
704 for (label procMeshI = 1; procMeshI < nMeshes; ++procMeshI)
706 const auto& global = procToGlobal[procMeshI];
707 if (global != global0)
710 <<
"At mesh from processor " << procIDs[procMeshI]
711 <<
" have global interfaces " << global
712 <<
" which differ from those on processor "
713 << procIDs[procMeshI]
723 Pout<<
"Global interfaces:" <<
endl;
724 const auto& global0 = procToGlobal[0];
725 for (
const label intI : global0)
727 Pout<<
" interfacei:" << intI
728 <<
" type:" << myInterfaces[intI].type()
734 Pout<<
"Remaining interfaces:" <<
endl;
735 for (
const auto& iter : unmergedMap.csorted())
737 Pout<<
" agglom procEdge:" << iter.key() <<
endl;
741 label procMeshI = elems[i][0];
742 label interfacei = elems[i][1];
744 mesh(myMesh, otherMeshes, procMeshI).interfaces();
746 const processorLduInterface& pldui =
752 Pout<<
" proc:" << procIDs[procMeshI]
753 <<
" interfacei:" << interfacei
754 <<
" between:" << pldui.myProcNo()
755 <<
" and:" << pldui.neighbProcNo()
764 Pout<<
"Merged interfaces:" <<
endl;
766 for (
const auto& iter : mergedMap.csorted())
768 Pout<<
" agglom procEdge:" << iter.key() <<
endl;
773 label procMeshI = elems[i][0];
774 label interfacei = elems[i][1];
776 mesh(myMesh, otherMeshes, procMeshI).interfaces();
777 const processorLduInterface& pldui =
783 Pout<<
" proc:" << procIDs[procMeshI]
784 <<
" interfacei:" << interfacei
785 <<
" between:" << pldui.myProcNo()
786 <<
" and:" << pldui.neighbProcNo()
798 faceOffsets.setSize(nMeshes+1);
801 for (label procMeshI = 0; procMeshI < nMeshes; ++procMeshI)
803 const lduMesh& procMesh =
mesh(myMesh, otherMeshes, procMeshI);
804 label nInternal = procMesh.lduAddr().lowerAddr().size();
806 faceOffsets[procMeshI+1] =
807 faceOffsets[procMeshI]
809 + nCoupledFaces[procMeshI];
812 map.setSize(nInternal);
815 map[i] = faceOffsets[procMeshI] + i;
821 lowerAddr_.setSize(faceOffsets.last(), -1);
822 upperAddr_.setSize(lowerAddr_.size(), -1);
828 for (label procMeshI = 0; procMeshI < nMeshes; ++procMeshI)
830 const lduMesh& procMesh =
mesh(myMesh, otherMeshes, procMeshI);
832 const labelUList& l = procMesh.lduAddr().lowerAddr();
833 const labelUList& u = procMesh.lduAddr().upperAddr();
836 label allFacei = faceOffsets[procMeshI];
840 lowerAddr_[allFacei] = cellOffsets[procMeshI]+l[facei];
841 upperAddr_[allFacei] = cellOffsets[procMeshI]+u[facei];
857 const processorLduInterface& pldui =
861 label myP = pldui.myProcNo();
862 label nbrP = pldui.neighbProcNo();
863 label nbrProcMeshI = procIDs.find(nbrP);
865 if (procMeshI < nbrProcMeshI)
870 const label agglom0 = procAgglomMap[myP];
871 const label agglom1 = procAgglomMap[nbrP];
874 mergedMap.cfind(edge(agglom0, agglom1));
880 const label nbrIntI = findConnectedInterface
900 nbrInterfaces[nbrIntI].faceCells();
902 if (faceCells.size() != nbrFaceCells.size())
905 <<
"faceCells:" << faceCells
906 <<
" nbrFaceCells:" << nbrFaceCells
912 boundaryFaceMap[procMeshI][intI];
914 boundaryFaceMap[nbrProcMeshI][nbrIntI];
916 bfMap.
setSize(faceCells.size());
917 nbrBfMap.setSize(faceCells.size());
921 lowerAddr_[allFacei] =
922 cellOffsets[procMeshI]+faceCells[pfI];
923 bfMap[pfI] = allFacei;
924 upperAddr_[allFacei] =
925 cellOffsets[nbrProcMeshI]+nbrFaceCells[pfI];
926 nbrBfMap[pfI] = (-allFacei-1);
956 map[i] = oldToNew[
map[i]];
960 label allFacei = -
map[i]-1;
961 map[i] = -oldToNew[allFacei]-1;
970 forAll(boundaryFaceMap, proci)
972 const labelList& bMap = boundaryMap[proci];
975 if (bMap[intI] == -1)
978 labelList& bfMap = boundaryFaceMap[proci][intI];
984 bfMap[i] = oldToNew[bfMap[i]];
988 label allFacei = -bfMap[i]-1;
989 bfMap[i] = (-oldToNew[allFacei]-1);
1001 interfaces_.
setSize(unmergedMap.size() + procToGlobal[0].size());
1002 primitiveInterfaces_.setSize(interfaces_.size());
1004 label allInterfacei = 0;
1012 const auto& global0 = procToGlobal[0];
1014 for (
const label interfacei : global0)
1024 for (label procMeshI = 0; procMeshI < nMeshes; ++procMeshI)
1026 const auto& procMesh =
mesh(myMesh, otherMeshes, procMeshI);
1027 n += procMesh.interfaces()[interfacei].faceCells().size();
1038 for (label procMeshI = 0; procMeshI < nMeshes; ++procMeshI)
1040 faceOffsets[procMeshI] =
n;
1042 const auto& procMesh =
mesh(myMesh, otherMeshes, procMeshI);
1045 allProcInterfaces.set(procMeshI, &
interfaces[interfacei]);
1046 boundaryMap[procMeshI][interfacei] = allInterfacei;
1047 labelList& bfMap = boundaryFaceMap[procMeshI][interfacei];
1050 bfMap.setSize(l.size());
1054 allFaceCells[
n] = cellOffsets[procMeshI]+l[facei];
1055 allFaceRestrictAddressing[
n] =
n;
1062 faceOffsets.last() =
n;
1065 const auto& myFineInterface =
1068 autoPtr<GAMGInterface> ppPtr
1070 myFineInterface.clone
1076 allFaceRestrictAddressing,
1085 primitiveInterfaces_.set
1091 interfaces_.set(allInterfacei, &primitiveInterfaces_[allInterfacei]);
1095 Pout<<
"Created " << interfaces_[allInterfacei].type()
1096 <<
" interface at " << allInterfacei
1097 <<
" comm:" << comm_
1098 <<
" myProcNo:" << myAgglom
1099 <<
" nFaces:" << allFaceCells.size()
1112 for (
const auto& iter : unmergedMap.csorted())
1122 label procMeshI = elem[0];
1123 label interfacei = elem[1];
1131 const processorLduInterface& pldui =
1136 label myProcNo = pldui.myProcNo();
1137 label nbrProcNo = pldui.neighbProcNo();
1140 min(myProcNo, nbrProcNo),
1141 max(myProcNo, nbrProcNo)
1152 const labelPair& elem = elems[order[i]];
1153 label procMeshI = elem[0];
1154 label interfacei = elem[1];
1173 const labelPair& elem = elems[order[i]];
1174 label procMeshI = elem[0];
1175 label interfacei = elem[1];
1183 boundaryMap[procMeshI][interfacei] = allInterfacei;
1184 labelList& bfMap = boundaryFaceMap[procMeshI][interfacei];
1187 bfMap.setSize(l.size());
1191 allFaceCells[
n] = cellOffsets[procMeshI]+l[facei];
1192 allFaceRestrictAddressing[
n] =
n;
1201 label neighbProcNo = -1;
1205 if (iter.key()[0] == myAgglom)
1207 if (iter.key()[1] == myAgglom)
1210 <<
"problem procEdge:" << iter.key()
1214 neighbProcNo = iter.key()[1];
1218 if (iter.key()[1] != myAgglom)
1221 <<
"problem procEdge:" << iter.key()
1225 neighbProcNo = iter.key()[0];
1228 primitiveInterfaces_.set
1231 new processorGAMGInterface
1236 allFaceRestrictAddressing,
1244 interfaces_.set(allInterfacei, &primitiveInterfaces_[allInterfacei]);
1248 Pout<<
"Created " << interfaces_[allInterfacei].type()
1249 <<
" interface at " << allInterfacei
1250 <<
" comm:" << comm_
1251 <<
" myProcNo:" << myAgglom
1252 <<
" neighbProcNo:" << neighbProcNo
1253 <<
" nFaces:" << allFaceCells.size()
1262 if (allInterfacei != interfaces_.size())
1272 <<
"Created new lduPrimitiveMesh:" <<
nl
1274 <<
" internal face lower:"
1276 <<
" internal faces upper:"
1281 if (interfaces_.set(i))
1283 Pout<<
" interface:" << i <<
" type:" << interfaces_[i].type()
1285 <<
" faceCells:" <<
flatOutput(interfaces_[i].faceCells())
1291 Pout<<
"Original input meshes:" <<
endl;
1292 forAll(boundaryMap, procMeshI)
1294 const auto& procMesh =
mesh(myMesh, otherMeshes, procMeshI);
1297 Pout<<
" proc:" << procMeshI
1303 Pout<<
" int:" << inti
1305 <<
" size:" <<
interfaces[inti].faceCells().size()
1306 <<
" maps to:" << boundaryMap[procMeshI][inti]
1327 const lduMesh& myMesh,
1328 const PtrList<lduPrimitiveMesh>& otherMeshes,
1332 return (meshI == 0 ? myMesh : otherMeshes[meshI-1]);
1344 (void)
mesh.lduAddr().patchSchedule();
1355 boolList validInterface(interfaces.size());
1358 validInterface[intI] = interfaces.set(intI);
1364 << addressing.
size()
1371 if (interfaces.set(intI))
1373 const GAMGInterface&
interface =
refCast<const GAMGInterface>
1385 pBufs.finishedGathers();
1393 otherMeshes.
setSize(nProcs-1);
1399 const label nCells =
readLabel(fromProc);
1402 const boolList validInterface(fromProc);
1421 forAll(validInterface, intI)
1423 if (validInterface[intI])
1425 word coupleType(fromProc);
1434 otherMeshes[proci-1].rawInterfaces(),
1441 otherMeshes[proci-1].addInterfaces
1444 nonBlockingSchedule<processorGAMGInterface>
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
void resize(const label len)
Alter addressable list size, allocating new space if required while recovering old content.
Map from edge (expressed as its endpoints) to value. Hashing (and ==) on an edge is symmetric.
Abstract base class for GAMG agglomerated interfaces.
static autoPtr< GAMGInterface > New(const label index, const lduInterfacePtrsList &coarseInterfaces, const lduInterface &fineInterface, const labelField &localRestrictAddressing, const labelField &neighbourRestrictAddressing, const label fineLevelIndex, const label coarseComm)
Return a pointer to a new interface created on freestore given.
const_iterator cfind(const Key &key) const
Find and return an const_iterator set at the hashed entry.
label size() const noexcept
The number of elements in table.
UPtrList< const node_type > csorted() const
Const access to the hash-table contents in sorted order (sorted by keys).
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void append(const T &val)
Append an element at the end of the list.
void setSize(label n)
Alias for resize().
Buffers for inter-processor communications streams (UOPstream, UIPstream).
void finishedGathers(const bool wait=true)
Mark all sends to master as done.
A list of pointers to objects of type <T>, with 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,...
void setSize(const label n)
Same as resize().
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].
label find(const T &val) const
Find index of the first occurrence of the value.
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 label nRequests() noexcept
Number of outstanding requests (on the internal list of requests).
@ nonBlocking
"nonBlocking" (immediate) : (MPI_Isend, MPI_Irecv)
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.
static void waitRequests()
Wait for all requests to finish.
const T * set(const label i) const
Return const pointer to element (can be nullptr), or nullptr for out-of-range access (ie,...
void setSize(const label n)
Alias for resize().
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.
T * ptr() noexcept
Same as release().
An edge is a list of two vertex labels. This can correspond to a directed graph edge or an edge on a ...
Smooth ATC in cells next to a set of patches supplied by type.
virtual lduInterfacePtrsList interfaces() const
Return a list of pointers for each patch.
virtual const lduAddressing & lduAddr() const
Return ldu addressing.
virtual label comm() const
Return communicator used for parallel communication.
Calculates a non-overlapping list of offsets based on an input size (eg, number of cells) from differ...
label localStart(const label proci) const
Start of proci data.
The class contains the addressing required by the lduMatrix: upper, lower and losort.
void map(const UList< Type > &faceVals, List< Type > &vals) const
Helper to convert lower addressing & data into CSR format.
virtual const labelUList & upperAddr() const =0
Return upper addressing.
lduAddressing(const lduAddressing &)=delete
No copy construct.
virtual const labelUList & lowerAddr() const =0
Return lower addressing.
label size() const noexcept
Return number of equations.
An abstract base class for implicitly-coupled interfaces e.g. processor and cyclic patches.
virtual const labelUList & faceCells() const =0
Return faceCell addressing.
Abstract base class for meshes which provide LDU addressing for the construction of lduMatrix and LDU...
virtual label comm() const =0
Return communicator used for parallel communication.
virtual const lduAddressing & lduAddr() const =0
Return ldu addressing.
virtual lduInterfacePtrsList interfaces() const =0
Return a list of pointers for each patch with only those pointing to interfaces being set.
Simplest concrete lduMesh that stores the addressing needed by lduMatrix.
virtual const labelUList & upperAddr() const
Return Upper addressing.
static void checkUpperTriangular(const label size, const labelUList &l, const labelUList &u)
Check if in upper-triangular ordering.
const lduInterfacePtrsList & rawInterfaces() const
Return a list of pointers for each patch.
static labelListList globalCellCells(const lduMesh &mesh, const globalIndex &globalNumbering)
Calculate global cell-cells.
void addInterfaces(lduInterfacePtrsList &interfaces, const lduSchedule &ps)
Add interfaces to a mesh constructed without.
static void gather(const label agglomComm, const lduMesh &mesh, PtrList< lduPrimitiveMesh > &otherMeshes)
Gather meshes from other processors using agglomComm.
PtrList< const lduInterface > & primitiveInterfaces()
Return a non-const list of primitive interfaces.
static labelList upperTriOrder(const label nCells, const labelUList &lower, const labelUList &upper)
Calculate upper-triangular order.
virtual label comm() const
Return communicator used for parallel communication.
static lduSchedule nonBlockingSchedule(const lduInterfacePtrsList &)
Get non-scheduled send/receive schedule.
static const lduMesh & mesh(const lduMesh &mesh0, const PtrList< lduPrimitiveMesh > &otherMeshes, const label meshI)
Select either mesh0 (meshI is 0) or otherMeshes[meshI-1].
virtual lduInterfacePtrsList interfaces() const
Return a list of pointers for each patch with only those pointing to interfaces being set.
virtual const lduAddressing & lduAddr() const
Return ldu addressing.
virtual const labelUList & lowerAddr() const
Return Lower addressing.
GAMG agglomerated processor interface.
An abstract base class for processor coupled interfaces.
virtual int neighbProcNo() const =0
Return neighbour processor number (rank in communicator).
virtual int myProcNo() const =0
Return processor number (rank in communicator).
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Foam::PtrList< Foam::fvMesh > meshes(regionNames.size())
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define WarningInFunction
Report a warning using Foam::Warning.
const dimensionedScalar c1
First radiation constant: default SI units: [W/m2].
Namespace for handling debugging switches.
string upper(const std::string &s)
Return string copy transformed with std::toupper on each character.
string lower(const std::string &s)
Return string copy transformed with std::tolower on each character.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
Type & refCast(U &obj)
A dynamic_cast (for references) to Type reference.
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< labelPair > labelPairList
List of labelPair.
List< labelList > labelListList
List of labelList.
List< label > labelList
A List of labels.
UIndirectList< label > labelUIndList
UIndirectList of labels.
List< labelListList > labelListListList
List of labelListList.
label readLabel(const char *buf)
Parse entire buffer as a label, skipping leading/trailing whitespace.
UPtrList< const lduInterface > lduInterfacePtrsList
Store lists of lduInterface as a UPtrList.
List< lduScheduleEntry > lduSchedule
A List of lduSchedule entries.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void inplaceReorder(const labelUList &oldToNew, ListType &input, const bool prune=false)
Inplace reorder the elements of a list.
const Type * isA(const U &obj)
Attempt dynamic_cast to Type.
labelList sortedOrder(const UList< T > &input)
Return the (stable) sort order for the list.
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)
Field< label > labelField
Specialisation of Field<T> for label.
List< bool > boolList
A List of bools.
static constexpr const zero Zero
Global zero (0).
Field< tensor > tensorField
Specialisation of Field<T> for tensor.
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.
labelList findIndices(const ListType &input, typename ListType::const_reference val, label start=0)
Linear search to find all occurrences of given element.
errorManipArg< error, int > exit(error &err, const int errNo=1)
UList< label > labelUList
A UList of labels.
constexpr char nl
The newline '\n' character (0x0a).
interfaceProperties interface(alpha1, U, thermo->transportPropertiesDict())
#define forAll(list, i)
Loop across all elements in list.