45 Pstream::defaultCommsType == Pstream::commsTypes::blocking
46 || Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
49 forAll(interfaces, interfacei)
51 if (interfaces.
set(interfacei))
53 interfaces[interfacei].initInterfaceMatrixUpdate
58 coupleCoeffs[interfacei],
60 Pstream::defaultCommsType
65 else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled)
67 const lduSchedule& patchSchedule = this->patchSchedule();
73 label interfacei=patchSchedule.size()/2;
74 interfacei<interfaces.
size();
78 if (interfaces.
set(interfacei))
80 interfaces[interfacei].initInterfaceMatrixUpdate
85 coupleCoeffs[interfacei],
87 Pstream::commsTypes::blocking
95 <<
"Unsupported communications type "
96 << Pstream::commsTypeNames[Pstream::defaultCommsType]
110 const label startRequest
113 if (Pstream::defaultCommsType == Pstream::commsTypes::blocking)
115 forAll(interfaces, interfacei)
117 if (interfaces.
set(interfacei))
119 interfaces[interfacei].updateInterfaceMatrix
124 coupleCoeffs[interfacei],
126 Pstream::defaultCommsType
131 else if (Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking)
134 bool allUpdated =
false;
136 for (label i=0; i<UPstream::nPollProcInterfaces; i++)
140 forAll(interfaces, interfacei)
142 if (interfaces.
set(interfacei))
144 if (!interfaces[interfacei].updatedMatrix())
146 if (interfaces[interfacei].ready())
148 interfaces[interfacei].updateInterfaceMatrix
153 coupleCoeffs[interfacei],
155 Pstream::defaultCommsType
173 if (Pstream::parRun())
178 UPstream::resetRequests(startRequest);
183 UPstream::waitRequests(startRequest);
188 forAll(interfaces, interfacei)
192 interfaces.
set(interfacei)
193 && !interfaces[interfacei].updatedMatrix()
196 interfaces[interfacei].updateInterfaceMatrix
201 coupleCoeffs[interfacei],
203 Pstream::defaultCommsType
208 else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled)
210 const lduSchedule& patchSchedule = this->patchSchedule();
215 label interfacei = patchSchedule[i].patch;
217 if (interfaces.
set(interfacei))
219 if (patchSchedule[i].
init)
221 interfaces[interfacei].initInterfaceMatrixUpdate
226 coupleCoeffs[interfacei],
228 Pstream::commsTypes::scheduled
233 interfaces[interfacei].updateInterfaceMatrix
238 coupleCoeffs[interfacei],
240 Pstream::commsTypes::scheduled
250 label interfacei=patchSchedule.size()/2;
251 interfacei<interfaces.
size();
255 if (interfaces.
set(interfacei))
257 interfaces[interfacei].updateInterfaceMatrix
262 coupleCoeffs[interfacei],
264 Pstream::commsTypes::blocking
272 <<
"Unsupported communications type "
273 << Pstream::commsTypeNames[Pstream::defaultCommsType]