36 const polyBoundaryMesh& patches
41 label nNeighbours = 0;
45 boolList isNeighbourProc(nProcs,
false);
49 const polyPatch& patch = patches[
patchi];
51 if (isA<processorPolyPatch>(patch))
53 const processorPolyPatch& procPatch =
54 refCast<const processorPolyPatch>(patch);
56 label pNeighbProcNo = procPatch.neighbProcNo();
58 if (!isNeighbourProc[pNeighbProcNo])
62 maxNb =
max(maxNb, procPatch.neighbProcNo());
64 isNeighbourProc[pNeighbProcNo] =
true;
73 forAll(isNeighbourProc, proci)
75 if (isNeighbourProc[proci])
77 neighbours[nNeighbours++] = proci;
81 procPatchMap_.
setSize(maxNb + 1);
86 const polyPatch& patch = patches[
patchi];
88 if (isA<processorPolyPatch>(patch))
90 const processorPolyPatch& procPatch =
91 refCast<const processorPolyPatch>(patch);
94 procPatchMap_[procPatch.neighbProcNo()] =
patchi;
104 const polyBoundaryMesh& patches
109 label patchEvali = 0;
121 if (!isA<processorPolyPatch>(patches[
patchi]))
136 if (isA<processorPolyPatch>(patches[
patchi]))
146 if (isA<processorPolyPatch>(patches[
patchi]))
167 patchSchedule_(2*patches.
size())
186 label patchEvali = 0;
193 if (!isA<processorPolyPatch>(patches[
patchi]))
195 patchSchedule_[patchEvali].patch =
patchi;
196 patchSchedule_[patchEvali++].init =
true;
197 patchSchedule_[patchEvali].patch =
patchi;
198 patchSchedule_[patchEvali++].init =
false;
209 forAll(procNbrProcs_, proci)
211 nComms += procNbrProcs_[proci].
size();
215 forAll(procNbrProcs_, proci)
217 const labelList& nbrs = procNbrProcs_[proci];
241 label commI = mySchedule[iter];
244 label nb = comms[commI][0];
247 nb = comms[commI][1];
253 patchSchedule_[patchEvali].patch =
patchi;
254 patchSchedule_[patchEvali++].init =
true;
255 patchSchedule_[patchEvali].patch =
patchi;
256 patchSchedule_[patchEvali++].init =
false;
260 patchSchedule_[patchEvali].patch =
patchi;
261 patchSchedule_[patchEvali++].init =
false;
262 patchSchedule_[patchEvali].patch =
patchi;
263 patchSchedule_[patchEvali++].init =
true;
269 patchSchedule_ = nonBlockingSchedule(patches);
const fvPatchList & patches
static void scatterList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
Scatter data. Reverse of gatherList.
#define forAll(list, i)
Loop across all elements in list.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
FvWallInfoData< WallInfo, label > label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void size(const label)
Override size to be inconsistent with allocated storage.
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
processorTopology(const polyBoundaryMesh &patches, const label comm)
Construct from boundaryMesh.
List< lduScheduleEntry > lduSchedule
static int & msgType()
Message tag of standard messages.
const lduSchedule & patchSchedule() const
Order in which the patches should be initialised/evaluated.
List< bool > boolList
Bool container classes.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects...
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
Pair< label > labelPair
Label pair.
List< label > labelList
A List of labels.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & shrink()
Shrink the allocated space to the number of elements used.
Determines the order in which a set of processors should communicate with one another.
label size() const
Return the number of elements in the UPtrList.
static commsTypes defaultCommsType
Default commsType.
void setSize(const label)
Reset size of List.
static bool & parRun()
Is this a parallel run?
static label nProcs(const label communicator=0)
Number of processes in parallel run.
static void gatherList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
Gather data but keep individual values separate.