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
60 coupleCoeffs[interfacei],
62 Pstream::defaultCommsType
67 else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled)
69 const lduSchedule& patchSchedule = this->patchSchedule();
75 label interfacei=patchSchedule.size()/2;
76 interfacei<interfaces.
size();
80 if (interfaces.
set(interfacei))
82 interfaces[interfacei].initInterfaceMatrixUpdate
89 coupleCoeffs[interfacei],
91 Pstream::commsTypes::blocking
99 <<
"Unsupported communications type "
100 << Pstream::commsTypeNames[Pstream::defaultCommsType]
114 const label startRequest
117 if (Pstream::defaultCommsType == Pstream::commsTypes::blocking)
119 forAll(interfaces, interfacei)
121 if (interfaces.
set(interfacei))
123 interfaces[interfacei].updateInterfaceMatrix
130 coupleCoeffs[interfacei],
132 Pstream::defaultCommsType
137 else if (Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking)
140 bool allUpdated =
false;
142 for (label i=0; i<UPstream::nPollProcInterfaces; i++)
146 forAll(interfaces, interfacei)
148 if (interfaces.
set(interfacei))
150 if (!interfaces[interfacei].updatedMatrix())
152 if (interfaces[interfacei].ready())
154 interfaces[interfacei].updateInterfaceMatrix
161 coupleCoeffs[interfacei],
163 Pstream::defaultCommsType
181 if (Pstream::parRun())
186 UPstream::resetRequests(startRequest);
191 UPstream::waitRequests(startRequest);
196 forAll(interfaces, interfacei)
200 interfaces.
set(interfacei)
201 && !interfaces[interfacei].updatedMatrix()
204 interfaces[interfacei].updateInterfaceMatrix
211 coupleCoeffs[interfacei],
213 Pstream::defaultCommsType
218 else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled)
220 const lduSchedule& patchSchedule = this->patchSchedule();
223 for (
const auto& sched : patchSchedule)
225 const label interfacei = sched.patch;
227 if (interfaces.
set(interfacei))
231 interfaces[interfacei].initInterfaceMatrixUpdate
238 coupleCoeffs[interfacei],
240 Pstream::commsTypes::scheduled
245 interfaces[interfacei].updateInterfaceMatrix
252 coupleCoeffs[interfacei],
254 Pstream::commsTypes::scheduled
264 label interfacei=patchSchedule.size()/2;
265 interfacei<interfaces.
size();
269 if (interfaces.
set(interfacei))
271 interfaces[interfacei].updateInterfaceMatrix
278 coupleCoeffs[interfacei],
280 Pstream::commsTypes::blocking
288 <<
"Unsupported communications type "
289 << Pstream::commsTypeNames[Pstream::defaultCommsType]