44 outstandingSendRequest_(-1),
45 outstandingRecvRequest_(-1),
63 outstandingSendRequest_(-1),
64 outstandingRecvRequest_(-1),
82 outstandingSendRequest_(-1),
83 outstandingRecvRequest_(-1),
87 if (!isA<processorFvPatch>(
p))
92 ) <<
"\n patch type '" <<
p.type()
93 <<
"' not constraint type '" <<
typeName <<
"'"
94 <<
"\n for patch " <<
p.name()
101 if (!dict.
found(
"value"))
121 outstandingSendRequest_(-1),
122 outstandingRecvRequest_(-1),
126 if (!isA<processorFvPatch>(this->
patch()))
129 <<
"' not constraint type '" <<
typeName <<
"'"
130 <<
"\n for patch " <<
p.name()
135 if (debug && !ptf.
ready())
138 <<
"On patch " << procPatch_.
name() <<
" outstanding request."
155 outstandingSendRequest_(-1),
156 outstandingRecvRequest_(-1),
160 if (debug && !ptf.
ready())
163 <<
"On patch " << procPatch_.
name() <<
" outstanding request."
185 if (debug && !this->ready())
188 <<
"On patch " << procPatch_.name()
189 <<
" outstanding request."
204 this->patchInternalField(sendBuf_);
213 this->
setSize(sendBuf_.size());
218 procPatch_.neighbProcNo(),
219 reinterpret_cast<char*
>(this->begin()),
229 procPatch_.neighbProcNo(),
230 reinterpret_cast<const char*
>(sendBuf_.begin()),
238 procPatch_.compressedSend(commsType, sendBuf_);
262 outstandingRecvRequest_ >= 0
268 outstandingSendRequest_ = -1;
269 outstandingRecvRequest_ = -1;
273 procPatch_.compressedReceive<Type>(commsType, *
this);
276 procPatch_.transform().transform(*
this, *
this);
288 return deltaCoeffs*(*
this - this->patchInternalField());
302 this->patch().patchInternalField(psiInternal, scalarSendBuf_);
311 if (debug && !this->ready())
314 <<
"On patch " << procPatch_.name()
315 <<
" outstanding request."
320 scalarReceiveBuf_.setSize(scalarSendBuf_.size());
325 procPatch_.neighbProcNo(),
326 reinterpret_cast<char*
>(scalarReceiveBuf_.begin()),
327 scalarReceiveBuf_.byteSize(),
336 procPatch_.neighbProcNo(),
337 reinterpret_cast<const char*
>(scalarSendBuf_.begin()),
338 scalarSendBuf_.byteSize(),
345 procPatch_.compressedSend(commsType, scalarSendBuf_);
362 if (this->updatedMatrix())
367 const labelUList& faceCells = this->patch().faceCells();
378 outstandingRecvRequest_ >= 0
385 outstandingSendRequest_ = -1;
386 outstandingRecvRequest_ = -1;
391 transformCoupleField(scalarReceiveBuf_, cmpt);
396 result[faceCells[elemI]] -= coeffs[elemI]*scalarReceiveBuf_[elemI];
403 procPatch_.compressedReceive<scalar>(commsType, this->size())()
407 transformCoupleField(pnf, cmpt);
412 result[faceCells[elemI]] -= coeffs[elemI]*pnf[elemI];
429 this->patch().patchInternalField(psiInternal, sendBuf_);
438 if (debug && !this->ready())
441 <<
"On patch " << procPatch_.name()
442 <<
" outstanding request."
447 receiveBuf_.setSize(sendBuf_.size());
452 procPatch_.neighbProcNo(),
453 reinterpret_cast<char*
>(receiveBuf_.begin()),
454 receiveBuf_.byteSize(),
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();
504 outstandingRecvRequest_ >= 0
511 outstandingSendRequest_ = -1;
512 outstandingRecvRequest_ = -1;
517 transformCoupleField(receiveBuf_);
522 result[faceCells[elemI]] -= coeffs[elemI]*receiveBuf_[elemI];
529 procPatch_.compressedReceive<Type>(commsType, this->size())()
533 transformCoupleField(pnf);
538 result[faceCells[elemI]] -= coeffs[elemI]*pnf[elemI];
551 outstandingSendRequest_ >= 0
561 outstandingSendRequest_ = -1;
565 outstandingRecvRequest_ >= 0
575 outstandingRecvRequest_ = -1;
#define forAll(list, i)
Loop across all elements in list.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Pre-declare SubField and related Field type.
virtual void updateInterfaceMatrix(scalarField &, const scalarField &, const scalarField &, const direction, const Pstream::commsTypes commsType) const=0
Inherit updateInterfaceMatrix from lduInterfaceField.
virtual void initInterfaceMatrixUpdate(scalarField &, const scalarField &, const scalarField &, const direction, const Pstream::commsTypes commsType) const
Inherit initInterfaceMatrixUpdate from lduInterfaceField.
static label read(const commsTypes commsType, const int fromProcNo, char *buf, const std::streamsize bufSize, const int tag=UPstream::msgType(), const label communicator=0)
Read into given buffer from given processor and return the.
virtual Ostream & write(const token &)
Write token.
commsTypes
Types of communications.
static bool floatTransfer
Should compact transfer be used in which floats replace doubles.
static label nRequests()
Get number of outstanding requests.
static bool & parRun()
Is this a parallel run?
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.
Abstract base class for coupled patches.
virtual tmp< Field< Type > > snGrad() const
Return patch-normal gradient.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
Abstract base class for field mapping.
virtual tmp< Field< Type > > patchInternalField() const
Return internal field next to patch as patch field.
virtual void operator=(const UList< Type > &)
const DimensionedField< Type, fvMesh > & 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.
bool updatedMatrix() const
Whether matrix has been updated.
This boundary condition enables processor communication across patches.
virtual tmp< Field< Type > > patchNeighbourField(const Pstream::commsTypes) const
Return neighbour field given internal field.
processorFvPatchField(const fvPatch &, const DimensionedField< Type, fvMesh > &)
Construct from patch and internal field.
virtual void initEvaluate(const Pstream::commsTypes commsType)
Initialise the evaluation of the patch field.
~processorFvPatchField()
Destructor.
virtual void evaluate(const Pstream::commsTypes commsType)
Evaluate the patch field.
virtual bool ready() const
Is all data available.
A class for managing temporary objects.
Template function which returns the un-mangled name of a given type. Useful for types which do not ha...
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.
errorManipArg< error, int > exit(error &err, const int errNo=1)
To & refCast(From &r)
Reference type cast template function.
errorManip< error > abort(error &err)
points setSize(newPointi)