47 outstandingSendRequest_(-1),
48 outstandingRecvRequest_(-1),
66 outstandingSendRequest_(-1),
67 outstandingRecvRequest_(-1),
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()
102 if (!dict.
found(
"value"))
122 outstandingSendRequest_(-1),
123 outstandingRecvRequest_(-1),
127 if (!isA<processorFvPatch>(this->
patch()))
130 <<
"' not constraint type '" <<
typeName <<
"'"
131 <<
"\n for patch " << p.
name()
136 if (debug && !ptf.
ready())
139 <<
"On patch " << procPatch_.
name() <<
" outstanding request."
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_))
161 if (debug && !ptf.
ready())
164 <<
"On patch " << procPatch_.
name() <<
" outstanding request."
181 outstandingSendRequest_(-1),
182 outstandingRecvRequest_(-1),
186 if (debug && !ptf.
ready())
189 <<
"On patch " << procPatch_.
name() <<
" outstanding request."
201 if (debug && !this->ready())
204 <<
"On patch " << procPatch_.name()
205 <<
" outstanding request."
220 this->patchInternalField(sendBuf_);
231 <<
"Invalid for non-contiguous data types"
236 this->
setSize(sendBuf_.size());
241 procPatch_.neighbProcNo(),
252 procPatch_.neighbProcNo(),
253 sendBuf_.cdata_bytes(),
254 sendBuf_.size_bytes(),
261 procPatch_.compressedSend(commsType, sendBuf_);
285 outstandingRecvRequest_ >= 0
291 outstandingSendRequest_ = -1;
292 outstandingRecvRequest_ = -1;
296 procPatch_.compressedReceive<Type>(commsType, *
this);
301 transform(*
this, procPatch_.forwardT(), *
this);
314 return deltaCoeffs*(*
this - this->patchInternalField());
335 scalarSendBuf_.setSize(this->patch().size());
336 forAll(scalarSendBuf_, facei)
338 scalarSendBuf_[facei] = psiInternal[
faceCells[facei]];
348 if (debug && !this->ready())
351 <<
"On patch " << procPatch_.name()
352 <<
" outstanding request."
357 scalarReceiveBuf_.setSize(scalarSendBuf_.size());
362 procPatch_.neighbProcNo(),
363 scalarReceiveBuf_.data_bytes(),
364 scalarReceiveBuf_.size_bytes(),
373 procPatch_.neighbProcNo(),
374 scalarSendBuf_.cdata_bytes(),
375 scalarSendBuf_.size_bytes(),
382 procPatch_.compressedSend(commsType, scalarSendBuf_);
402 if (this->updatedMatrix())
418 outstandingRecvRequest_ >= 0
425 outstandingSendRequest_ = -1;
426 outstandingRecvRequest_ = -1;
429 if (!std::is_arithmetic<Type>::value)
432 transformCoupleField(scalarReceiveBuf_, cmpt);
436 this->addToInternalField
449 procPatch_.compressedReceive<solveScalar>
456 if (!std::is_arithmetic<Type>::value)
459 transformCoupleField(pnf, cmpt);
463 this->addToInternalField(result, !
add,
faceCells, coeffs, pnf);
482 sendBuf_.setSize(this->patch().size());
488 sendBuf_[facei] = psiInternal[
faceCells[facei]];
498 if (debug && !this->ready())
501 <<
"On patch " << procPatch_.name()
502 <<
" outstanding request."
507 receiveBuf_.setSize(sendBuf_.size());
512 procPatch_.neighbProcNo(),
513 receiveBuf_.data_bytes(),
514 receiveBuf_.size_bytes(),
523 procPatch_.neighbProcNo(),
524 sendBuf_.cdata_bytes(),
525 sendBuf_.size_bytes(),
532 procPatch_.compressedSend(commsType, sendBuf_);
551 if (this->updatedMatrix())
567 outstandingRecvRequest_ >= 0
574 outstandingSendRequest_ = -1;
575 outstandingRecvRequest_ = -1;
580 transformCoupleField(receiveBuf_);
583 this->addToInternalField(result, !
add,
faceCells, coeffs, receiveBuf_);
589 procPatch_.compressedReceive<Type>(commsType, this->size())()
593 transformCoupleField(pnf);
596 this->addToInternalField(result, !
add,
faceCells, coeffs, pnf);
608 outstandingSendRequest_ >= 0
618 outstandingSendRequest_ = -1;
622 outstandingRecvRequest_ >= 0
632 outstandingRecvRequest_ = -1;
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
static const char *const typeName
Typename for Field.
Generic templated field type.
void evaluate()
Evaluate boundary conditions.
const word & name() const noexcept
Return the object name.
virtual bool read()
Re-read model coefficients if they have changed.
commsTypes
Types of communications.
@ nonBlocking
"nonBlocking"
static bool floatTransfer
static label nRequests()
Get number of outstanding requests.
static bool finishedRequest(const label i)
Non-blocking comms: has request i finished?
static void waitRequest(const label i)
Wait until request i has finished.
static bool & parRun() noexcept
Test if this a parallel run.
virtual tmp< Field< Type > > snGrad() const
Return gradient at boundary.
Abstract base class for coupled patches.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Search for an entry (const access) with the given keyword.
Smooth ATC in cells next to a set of patches supplied by type.
virtual bool write()
Write the output fields.
A FieldMapper for finite-volume patch fields.
virtual tmp< Field< Type > > patchInternalField() const
Return internal field next to patch as patch field.
virtual void operator=(const UList< Type > &)
const DimensionedField< Type, volMesh > & internalField() const
Return dimensioned internal field reference.
const fvPatch & patch() const
Return patch.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
virtual const word & name() const
Return name.
The class contains the addressing required by the lduMatrix: upper, lower and losort.
virtual const labelUList & patchAddr(const label patchNo) const =0
Return patch to internal addressing given patch number.
bool updatedMatrix() const
Whether matrix has been updated.
This boundary condition enables processor communication across patches.
virtual void initInterfaceMatrixUpdate(solveScalarField &result, const bool add, const lduAddressing &lduAddr, const label patchId, const solveScalarField &psiInternal, const scalarField &coeffs, const direction cmpt, const Pstream::commsTypes commsType) const
Initialise neighbour matrix update.
virtual void updateInterfaceMatrix(solveScalarField &result, const bool add, const lduAddressing &lduAddr, const label patchId, const solveScalarField &psiInternal, const scalarField &coeffs, const direction cmpt, const Pstream::commsTypes commsType) const
Update result field based on interface functionality.
virtual void initEvaluate(const Pstream::commsTypes commsType)
Initialise the evaluation of the patch field.
virtual bool ready() const
Is all data available.
virtual tmp< Field< Type > > patchNeighbourField() const
Return neighbour field given internal field.
Abstract base class for processor coupled interfaces.
A class for managing temporary objects.
Template functions to aid in the implementation of demand driven data.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
To & refCast(From &r)
Reference type cast template function.
dimensionSet transform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
errorManip< error > abort(error &err)
errorManipArg< error, int > exit(error &err, const int errNo=1)
points setSize(newPointi)
#define forAll(list, i)
Loop across all elements in list.
A template class to specify that a data type can be considered as being contiguous in memory.