41 procPatch_(refCast<const processorFvPatch>(
p)),
44 outstandingSendRequest_(-1),
45 outstandingRecvRequest_(-1),
60 procPatch_(refCast<const processorFvPatch>(
p)),
63 outstandingSendRequest_(-1),
64 outstandingRecvRequest_(-1),
81 procPatch_(refCast<const processorFvPatch>(
p)),
84 outstandingSendRequest_(-1),
85 outstandingRecvRequest_(-1),
89 if (!isA<processorFvPatch>(this->patch()))
92 <<
"' not constraint type '" << typeName <<
"'"
93 <<
"\n for patch " <<
p.name()
98 if (debug && !ptf.
ready())
101 <<
"On patch " << procPatch_.name() <<
" outstanding request."
116 procPatch_(refCast<const processorFvPatch>(
p)),
119 outstandingSendRequest_(-1),
120 outstandingRecvRequest_(-1),
124 if (!isA<processorFvPatch>(
p))
129 ) <<
"\n patch type '" <<
p.type()
130 <<
"' not constraint type '" << typeName <<
"'"
131 <<
"\n for patch " <<
p.name()
147 procPatch_(refCast<const processorFvPatch>(ptf.
patch())),
150 outstandingSendRequest_(-1),
151 outstandingRecvRequest_(-1),
155 if (debug && !ptf.
ready())
158 <<
"On patch " << procPatch_.name() <<
" outstanding request."
172 procPatch_(refCast<const processorFvPatch>(ptf.
patch())),
175 outstandingSendRequest_(-1),
176 outstandingRecvRequest_(-1),
180 if (debug && !ptf.
ready())
183 <<
"On patch " << procPatch_.name() <<
" outstanding request."
202 if (debug && !this->ready())
205 <<
"On patch " << procPatch_.name()
206 <<
" outstanding request."
219 if (Pstream::parRun())
221 this->patchInternalField(sendBuf_);
223 if (commsType == Pstream::nonBlocking && !Pstream::floatTransfer)
226 this->
setSize(sendBuf_.size());
227 outstandingRecvRequest_ = UPstream::nRequests();
230 Pstream::nonBlocking,
231 procPatch_.neighbProcNo(),
232 reinterpret_cast<char*
>(this->begin()),
238 outstandingSendRequest_ = UPstream::nRequests();
241 Pstream::nonBlocking,
242 procPatch_.neighbProcNo(),
243 reinterpret_cast<const char*
>(sendBuf_.begin()),
251 procPatch_.compressedSend(commsType, sendBuf_);
263 if (Pstream::parRun())
265 if (commsType == Pstream::nonBlocking && !Pstream::floatTransfer)
271 outstandingRecvRequest_ >= 0
272 && outstandingRecvRequest_ < Pstream::nRequests()
275 UPstream::waitRequest(outstandingRecvRequest_);
277 outstandingSendRequest_ = -1;
278 outstandingRecvRequest_ = -1;
282 procPatch_.compressedReceive<Type>(commsType, *
this);
287 transform(*
this, procPatch_.forwardT(), *
this);
300 return deltaCoeffs*(*
this - this->patchInternalField());
314 this->patch().patchInternalField(psiInternal, scalarSendBuf_);
316 if (commsType == Pstream::nonBlocking && !Pstream::floatTransfer)
319 if (debug && !this->ready())
322 <<
"On patch " << procPatch_.name()
323 <<
" outstanding request."
328 scalarReceiveBuf_.setSize(scalarSendBuf_.size());
329 outstandingRecvRequest_ = UPstream::nRequests();
332 Pstream::nonBlocking,
333 procPatch_.neighbProcNo(),
334 reinterpret_cast<char*
>(scalarReceiveBuf_.begin()),
335 scalarReceiveBuf_.byteSize(),
340 outstandingSendRequest_ = UPstream::nRequests();
343 Pstream::nonBlocking,
344 procPatch_.neighbProcNo(),
345 reinterpret_cast<const char*
>(scalarSendBuf_.begin()),
346 scalarSendBuf_.byteSize(),
353 procPatch_.compressedSend(commsType, scalarSendBuf_);
370 if (this->updatedMatrix())
375 const labelUList& faceCells = this->patch().faceCells();
377 if (commsType == Pstream::nonBlocking && !Pstream::floatTransfer)
382 outstandingRecvRequest_ >= 0
383 && outstandingRecvRequest_ < Pstream::nRequests()
386 UPstream::waitRequest(outstandingRecvRequest_);
389 outstandingSendRequest_ = -1;
390 outstandingRecvRequest_ = -1;
395 transformCoupleField(scalarReceiveBuf_, cmpt);
400 result[faceCells[elemI]] -= coeffs[elemI]*scalarReceiveBuf_[elemI];
407 procPatch_.compressedReceive<scalar>(commsType, this->size())()
411 transformCoupleField(pnf, cmpt);
416 result[faceCells[elemI]] -= coeffs[elemI]*pnf[elemI];
433 this->patch().patchInternalField(psiInternal, sendBuf_);
435 if (commsType == Pstream::nonBlocking && !Pstream::floatTransfer)
438 if (debug && !this->ready())
441 <<
"On patch " << procPatch_.name()
442 <<
" outstanding request."
447 receiveBuf_.setSize(sendBuf_.size());
448 outstandingRecvRequest_ = UPstream::nRequests();
451 Pstream::nonBlocking,
452 procPatch_.neighbProcNo(),
453 reinterpret_cast<char*
>(receiveBuf_.begin()),
454 receiveBuf_.byteSize(),
459 outstandingSendRequest_ = UPstream::nRequests();
462 Pstream::nonBlocking,
463 procPatch_.neighbProcNo(),
464 reinterpret_cast<const char*
>(sendBuf_.begin()),
472 procPatch_.compressedSend(commsType, sendBuf_);
488 if (this->updatedMatrix())
493 const labelUList& faceCells = this->patch().faceCells();
495 if (commsType == Pstream::nonBlocking && !Pstream::floatTransfer)
500 outstandingRecvRequest_ >= 0
501 && outstandingRecvRequest_ < Pstream::nRequests()
504 UPstream::waitRequest(outstandingRecvRequest_);
507 outstandingSendRequest_ = -1;
508 outstandingRecvRequest_ = -1;
513 transformCoupleField(receiveBuf_);
518 result[faceCells[elemI]] -= coeffs[elemI]*receiveBuf_[elemI];
525 procPatch_.compressedReceive<Type>(commsType, this->size())()
529 transformCoupleField(pnf);
534 result[faceCells[elemI]] -= coeffs[elemI]*pnf[elemI];
547 outstandingSendRequest_ >= 0
548 && outstandingSendRequest_ < Pstream::nRequests()
551 bool finished = UPstream::finishedRequest(outstandingSendRequest_);
557 outstandingSendRequest_ = -1;
561 outstandingRecvRequest_ >= 0
562 && outstandingRecvRequest_ < Pstream::nRequests()
565 bool finished = UPstream::finishedRequest(outstandingRecvRequest_);
571 outstandingRecvRequest_ = -1;