44 procPatch_(refCast<const processorFvPatch>(
p)),
47 outstandingSendRequest_(-1),
48 outstandingRecvRequest_(-1),
63 procPatch_(refCast<const processorFvPatch>(
p)),
66 outstandingSendRequest_(-1),
67 outstandingRecvRequest_(-1),
82 procPatch_(refCast<const processorFvPatch>(
p,
dict)),
85 outstandingSendRequest_(-1),
86 outstandingRecvRequest_(-1),
90 if (!isA<processorFvPatch>(
p))
93 <<
"\n patch type '" <<
p.type()
94 <<
"' not constraint type '" << typeName <<
"'"
95 <<
"\n for patch " <<
p.name()
96 <<
" of field " << this->internalField().name()
97 <<
" in file " << this->internalField().objectPath()
102 if (!
dict.found(
"value"))
119 procPatch_(refCast<const processorFvPatch>(
p)),
122 outstandingSendRequest_(-1),
123 outstandingRecvRequest_(-1),
127 if (!isA<processorFvPatch>(this->
patch()))
130 <<
"' not constraint type '" << typeName <<
"'"
131 <<
"\n for patch " <<
p.name()
132 <<
" of field " << this->internalField().name()
133 <<
" in file " << this->internalField().objectPath()
139 <<
"On patch " << procPatch_.name() <<
" outstanding request."
153 procPatch_(refCast<const processorFvPatch>(ptf.
patch())),
154 sendBuf_(std::move(ptf.sendBuf_)),
155 receiveBuf_(std::move(ptf.receiveBuf_)),
156 outstandingSendRequest_(-1),
157 outstandingRecvRequest_(-1),
158 scalarSendBuf_(std::move(ptf.scalarSendBuf_)),
159 scalarReceiveBuf_(std::move(ptf.scalarReceiveBuf_))
164 <<
"On patch " << procPatch_.name() <<
" outstanding request."
178 procPatch_(refCast<const processorFvPatch>(ptf.
patch())),
181 outstandingSendRequest_(-1),
182 outstandingRecvRequest_(-1),
189 <<
"On patch " << procPatch_.name() <<
" outstanding request."
201 if (
debug && !this->ready())
204 <<
"On patch " << procPatch_.name()
205 <<
" outstanding request."
218 if (Pstream::parRun())
220 this->patchInternalField(sendBuf_);
224 commsType == Pstream::commsTypes::nonBlocking
225 && !Pstream::floatTransfer
229 this->
setSize(sendBuf_.size());
230 outstandingRecvRequest_ = UPstream::nRequests();
233 Pstream::commsTypes::nonBlocking,
234 procPatch_.neighbProcNo(),
235 reinterpret_cast<char*
>(this->
data()),
241 outstandingSendRequest_ = UPstream::nRequests();
244 Pstream::commsTypes::nonBlocking,
245 procPatch_.neighbProcNo(),
246 reinterpret_cast<const char*
>(sendBuf_.cdata()),
254 procPatch_.compressedSend(commsType, sendBuf_);
266 if (Pstream::parRun())
270 commsType == Pstream::commsTypes::nonBlocking
271 && !Pstream::floatTransfer
278 outstandingRecvRequest_ >= 0
279 && outstandingRecvRequest_ < Pstream::nRequests()
282 UPstream::waitRequest(outstandingRecvRequest_);
284 outstandingSendRequest_ = -1;
285 outstandingRecvRequest_ = -1;
289 procPatch_.compressedReceive<Type>(commsType, *
this);
294 transform(*
this, procPatch_.forwardT(), *
this);
307 return deltaCoeffs*(*
this - this->patchInternalField());
322 this->
patch().patchInternalField(psiInternal, scalarSendBuf_);
326 commsType == Pstream::commsTypes::nonBlocking
327 && !Pstream::floatTransfer
331 if (
debug && !this->ready())
334 <<
"On patch " << procPatch_.name()
335 <<
" outstanding request."
340 scalarReceiveBuf_.setSize(scalarSendBuf_.size());
341 outstandingRecvRequest_ = UPstream::nRequests();
344 Pstream::commsTypes::nonBlocking,
345 procPatch_.neighbProcNo(),
346 reinterpret_cast<char*
>(scalarReceiveBuf_.data()),
347 scalarReceiveBuf_.byteSize(),
352 outstandingSendRequest_ = UPstream::nRequests();
355 Pstream::commsTypes::nonBlocking,
356 procPatch_.neighbProcNo(),
357 reinterpret_cast<const char*
>(scalarSendBuf_.cdata()),
358 scalarSendBuf_.byteSize(),
365 procPatch_.compressedSend(commsType, scalarSendBuf_);
383 if (this->updatedMatrix())
390 commsType == Pstream::commsTypes::nonBlocking
391 && !Pstream::floatTransfer
397 outstandingRecvRequest_ >= 0
398 && outstandingRecvRequest_ < Pstream::nRequests()
401 UPstream::waitRequest(outstandingRecvRequest_);
404 outstandingSendRequest_ = -1;
405 outstandingRecvRequest_ = -1;
408 if (!std::is_arithmetic<Type>::value)
411 transformCoupleField(scalarReceiveBuf_, cmpt);
415 this->addToInternalField(result, !
add, coeffs, scalarReceiveBuf_);
421 procPatch_.compressedReceive<solveScalar>
428 if (!std::is_arithmetic<Type>::value)
431 transformCoupleField(pnf, cmpt);
435 this->addToInternalField(result, !
add, coeffs, pnf);
452 this->
patch().patchInternalField(psiInternal, sendBuf_);
456 commsType == Pstream::commsTypes::nonBlocking
457 && !Pstream::floatTransfer
461 if (
debug && !this->ready())
464 <<
"On patch " << procPatch_.name()
465 <<
" outstanding request."
470 receiveBuf_.setSize(sendBuf_.size());
471 outstandingRecvRequest_ = UPstream::nRequests();
474 Pstream::commsTypes::nonBlocking,
475 procPatch_.neighbProcNo(),
476 reinterpret_cast<char*
>(receiveBuf_.data()),
477 receiveBuf_.byteSize(),
482 outstandingSendRequest_ = UPstream::nRequests();
485 Pstream::commsTypes::nonBlocking,
486 procPatch_.neighbProcNo(),
487 reinterpret_cast<const char*
>(sendBuf_.cdata()),
495 procPatch_.compressedSend(commsType, sendBuf_);
512 if (this->updatedMatrix())
519 commsType == Pstream::commsTypes::nonBlocking
520 && !Pstream::floatTransfer
526 outstandingRecvRequest_ >= 0
527 && outstandingRecvRequest_ < Pstream::nRequests()
530 UPstream::waitRequest(outstandingRecvRequest_);
533 outstandingSendRequest_ = -1;
534 outstandingRecvRequest_ = -1;
539 transformCoupleField(receiveBuf_);
542 this->addToInternalField(result, !
add, coeffs, receiveBuf_);
548 procPatch_.compressedReceive<Type>(commsType, this->size())()
552 transformCoupleField(pnf);
555 this->addToInternalField(result, !
add, coeffs, pnf);
567 outstandingSendRequest_ >= 0
568 && outstandingSendRequest_ < Pstream::nRequests()
571 bool finished = UPstream::finishedRequest(outstandingSendRequest_);
577 outstandingSendRequest_ = -1;
581 outstandingRecvRequest_ >= 0
582 && outstandingRecvRequest_ < Pstream::nRequests()
585 bool finished = UPstream::finishedRequest(outstandingRecvRequest_);
591 outstandingRecvRequest_ = -1;