41 label nNeighbours = 0;
45 boolList isNeighbourProc(nProcs,
false);
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);
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;
123 patchSchedule[patchEvali].patch =
patchi;
124 patchSchedule[patchEvali++].init =
true;
125 patchSchedule[patchEvali].patch =
patchi;
126 patchSchedule[patchEvali++].init =
false;
138 patchSchedule[patchEvali].patch =
patchi;
139 patchSchedule[patchEvali++].init =
true;
148 patchSchedule[patchEvali].patch =
patchi;
149 patchSchedule[patchEvali++].init =
false;
153 return patchSchedule;
165 procNbrProcs_(
Pstream::nProcs(comm)),
167 patchSchedule_(2*
patches.size())
186 label patchEvali = 0;
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);
#define forAll(list, i)
Loop across all elements in list.
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.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & shrink()
Shrink the allocated space to the number of elements used.
void size(const label)
Override size to be inconsistent with allocated storage.
void setSize(const label)
Reset size of List.
Inter-processor communications stream.
static void scatterList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
Scatter data. Reverse of gatherList.
static void gatherList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
Gather data but keep individual values separate.
static label nProcs(const label communicator=0)
Number of processes in parallel run.
static bool & parRun()
Is this a parallel run?
static int & msgType()
Message tag of standard messages.
static commsTypes defaultCommsType
Default commsType.
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
label size() const
Return the number of elements in the UPtrList.
Determines the order in which a set of processors should communicate with one another.
processorTopology(const polyBoundaryMesh &patches, const label comm)
Construct from boundaryMesh.
const fvPatchList & patches
Pair< label > labelPair
Label pair.
List< label > labelList
A List of labels.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
List< bool > boolList
Bool container classes.
List< lduScheduleEntry > lduSchedule
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)