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]
102 const globalIndex& globalNumbering
115 globalNumbering.localStart(myProci)
120 PtrList<labelList> nbrGlobalCells(interfaces.size());
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))
212 const labelUList& faceCells = interfaces[inti].faceCells();
216 const label c0 = faceCells[facei];
217 cellCells[c0][nNbrs[c0]++] = nbrGlobalCells[inti][facei];
226 Foam::label Foam::lduPrimitiveMesh::totalSize
228 const PtrList<lduPrimitiveMesh>&
meshes 233 for (
const lduPrimitiveMesh& msh :
meshes)
235 size += msh.lduAddr().size();
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;
285 DynamicList<label> order;
286 DynamicList<label> nbr;
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++;
314 Foam::label Foam::lduPrimitiveMesh::findConnectedInterface
316 const lduMesh& myMesh,
317 const PtrList<lduPrimitiveMesh>& otherMeshes,
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];
340 const processorLduInterface& pldui =
341 refCast<const processorLduInterface>
343 interfaces[interfacei]
346 if (pldui.neighbProcNo() == myRank)
348 nbrInti = procAndInterface[1];
366 Foam::lduPrimitiveMesh::lduPrimitiveMesh
376 lowerAddr_(l, reuse),
377 upperAddr_(u, reuse),
382 if (
max(lowerAddr_) >= nCells ||
min(lowerAddr_) < 0)
385 <<
" nCells:" << nCells
386 <<
" max(lower):" <<
max(lowerAddr_)
387 <<
" min(lower):" <<
min(lowerAddr_)
393 if (
max(upperAddr_) >= nCells ||
min(upperAddr_) < 0)
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]);
426 Foam::lduPrimitiveMesh::lduPrimitiveMesh
436 Foam::lduPrimitiveMesh::lduPrimitiveMesh
449 primitiveInterfaces_(),
455 if (
max(lowerAddr_) >= nCells ||
min(lowerAddr_) < 0)
458 <<
" nCells:" << nCells
459 <<
" max(lower):" <<
max(lowerAddr_)
460 <<
" min(lower):" <<
min(lowerAddr_)
466 if (
max(upperAddr_) >= nCells ||
min(upperAddr_) < 0)
469 <<
" nCells:" << nCells
470 <<
" max(upper):" <<
max(upperAddr_)
471 <<
" min(upper):" <<
min(upperAddr_)
480 interfaces_.
setSize(primitiveInterfaces_.size());
481 forAll(primitiveInterfaces_, i)
483 if (primitiveInterfaces_.set(i))
485 interfaces_.
set(i, &primitiveInterfaces_[i]);
491 Foam::lduPrimitiveMesh::lduPrimitiveMesh
497 const lduMesh& myMesh,
498 const PtrList<lduPrimitiveMesh>& otherMeshes,
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;
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)
618 if (isA<processorLduInterface>(ldui))
620 if (isA<processorCyclicGAMGInterface>(ldui))
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 =
631 refCast<const processorLduInterface>(ldui);
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];
746 const processorLduInterface& pldui =
747 refCast<const processorLduInterface>
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];
777 const processorLduInterface& pldui =
778 refCast<const processorLduInterface>
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);
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];
855 if (isA<processorLduInterface>(ldui))
857 const processorLduInterface& pldui =
858 refCast<const processorLduInterface>(ldui);
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);
1046 boundaryMap[procMeshI][interfacei] = allInterfacei;
1047 labelList& bfMap = boundaryFaceMap[procMeshI][interfacei];
1054 allFaceCells[
n] = cellOffsets[procMeshI]+l[facei];
1055 allFaceRestrictAddressing[
n] =
n;
1062 faceOffsets.last() =
n;
1065 const auto& myFineInterface =
1066 refCast<const GAMGInterface>(myInterfaces[interfacei]);
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 =
1132 refCast<const processorLduInterface>
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];
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
1306 <<
" maps to:" << boundaryMap[procMeshI][inti]
1314 patchSchedule_ = nonBlockingSchedule<processorGAMGInterface>(interfaces_);
1327 const lduMesh& myMesh,
1328 const PtrList<lduPrimitiveMesh>& otherMeshes,
1332 return (meshI == 0 ? myMesh : otherMeshes[meshI-1]);
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);
1397 UIPstream fromProc(proci, pBufs);
1399 const label nCells =
readLabel(fromProc);
1402 const boolList validInterface(fromProc);
1409 new lduPrimitiveMesh
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>
virtual lduInterfacePtrsList interfaces() const =0
Return a list of pointers for each patch with only those pointing to interfaces being set...
Field< label > labelField
Specialisation of Field<T> for label.
void size(const label n)
Older name for setAddressableSize.
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.
errorManipArg< error, int > exit(error &err, const int errNo=1)
void addInterfaces(lduInterfacePtrsList &interfaces, const lduSchedule &ps)
Add interfaces to a mesh constructed without.
void resize(const label len)
Adjust allocated size of list.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
labelList sortedOrder(const UList< T > &input)
Return the (stable) sort order for the list.
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)
constexpr char nl
The newline '\n' character (0x0a)
Type & refCast(U &obj)
A dynamic_cast (for references) to Type reference.
void inplaceReorder(const labelUList &oldToNew, ListType &input, const bool prune=false)
Inplace reorder the elements of a list.
UIndirectList< label > labelUIndList
UIndirectList of labels.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Abstract base class for meshes which provide LDU addressing for the construction of lduMatrix and LDU...
label readLabel(const char *buf)
Parse entire buffer as a label, skipping leading/trailing whitespace.
string upper(const std::string &s)
Return string copy transformed with std::toupper on each character.
PtrList< const lduInterface > & primitiveInterfaces()
Return a non-const list of primitive interfaces.
labelList findIndices(const ListType &input, typename ListType::const_reference val, label start=0)
Linear search to find all occurrences of given element.
static int & msgType() noexcept
Message tag of standard messages.
interfaceProperties interface(alpha1, U, thermo->transportPropertiesDict())
List< lduScheduleEntry > lduSchedule
A List of lduSchedule entries.
List< labelPair > labelPairList
List of labelPair.
static int myProcNo(const label communicator=worldComm)
Rank of this process in the communicator (starting from masterNo()). Can be negative if the process i...
List< labelList > labelListList
List of labelList.
virtual const labelUList & lowerAddr() const =0
Return lower addressing.
static void waitRequests()
Wait for all requests to finish.
UList< label > labelUList
A UList of labels.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
#define forAll(list, i)
Loop across all elements in list.
static label nProcs(const label communicator=worldComm)
Number of ranks in parallel run (for given communicator). It is 1 for serial run. ...
virtual label comm() const
Return communicator used for parallel communication.
void setSize(const label n)
Alias for resize()
label size() const noexcept
Return number of equations.
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...
virtual const labelUList & upperAddr() const =0
Return upper addressing.
virtual const lduAddressing & lduAddr() const
Return ldu addressing.
static constexpr int masterNo() noexcept
Relative rank for the master process - is always 0.
label size() const noexcept
The number of entries in the list.
virtual label comm() const
Return communicator used for parallel communication.
virtual const lduAddressing & lduAddr() const
Return ldu addressing.
UPtrList< const lduInterface > lduInterfacePtrsList
Store lists of lduInterface as a UPtrList.
Foam::PtrList< Foam::fvMesh > meshes(regionNames.size())
Simplest concrete lduMesh that stores the addressing needed by lduMatrix.
List< labelListList > labelListListList
List of labelListList.
static const lduMesh & mesh(const lduMesh &mesh0, const PtrList< lduPrimitiveMesh > &otherMeshes, const label meshI)
Select either mesh0 (meshI is 0) or otherMeshes[meshI-1].
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
errorManip< error > abort(error &err)
const T * set(const label i) const
Return const pointer to element (can be nullptr), or nullptr for out-of-range access (ie...
static void gather(const label agglomComm, const lduMesh &mesh, PtrList< lduPrimitiveMesh > &otherMeshes)
Gather meshes from other processors using agglomComm.
int debug
Static debugging option.
Pair< label > labelPair
A pair of labels.
defineTypeNameAndDebug(combustionModel, 0)
Buffers for inter-processor communications streams (UOPstream, UIPstream).
void setSize(const label newLen)
Same as resize()
Field< tensor > tensorField
Specialisation of Field<T> for tensor.
string lower(const std::string &s)
Return string copy transformed with std::tolower on each character.
#define WarningInFunction
Report a warning using Foam::Warning.
virtual lduInterfacePtrsList interfaces() const
Return a list of pointers for each patch.
static void checkUpperTriangular(const label size, const labelUList &l, const labelUList &u)
Check if in upper-triangular ordering.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
static labelListList globalCellCells(const lduMesh &mesh, const globalIndex &globalNumbering)
Calculate global cell-cells.
static bool master(const label communicator=worldComm)
True if process corresponds to the master rank in the communicator.
const dimensionedScalar c1
First radiation constant: default SI units: [W/m2].
"nonBlocking" (immediate) : (MPI_Isend, MPI_Irecv)
The class contains the addressing required by the lduMatrix: upper, lower and losort.
static rangeType subProcs(const label communicator=worldComm)
Range of process indices for sub-processes.
List< label > labelList
A List of labels.
void setSize(const label n)
Alias for resize()
virtual lduInterfacePtrsList interfaces() const
Return a list of pointers for each patch with only those pointing to interfaces being set...
List< bool > boolList
A List of bools.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
static labelList upperTriOrder(const label nCells, const labelUList &lower, const labelUList &upper)
Calculate upper-triangular order.
virtual const lduSchedule & patchSchedule() const =0
Return patch field evaluation schedule.
const T * set(const label i) const
Return const pointer to element (can be nullptr), or nullptr for out-of-range access (ie...
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
Global flatOutput() function with specified output delimiters.
static constexpr const zero Zero
Global zero (0)