46 outstandingSendRequest_(-1),
47 outstandingRecvRequest_(-1)
58 procInterface_(ptf.procInterface_),
59 sendBuf_(procInterface_.
faceCells().size()),
60 receiveBuf_(procInterface_.
faceCells().size()),
61 scalarSendBuf_(procInterface_.
faceCells().size()),
62 scalarReceiveBuf_(procInterface_.
faceCells().size()),
63 outstandingSendRequest_(-1),
64 outstandingRecvRequest_(-1)
77 procInterface_(ptf.procInterface_),
78 sendBuf_(procInterface_.
faceCells().size()),
79 receiveBuf_(procInterface_.
faceCells().size()),
80 scalarSendBuf_(procInterface_.
faceCells().size()),
81 scalarReceiveBuf_(procInterface_.
faceCells().size()),
82 outstandingSendRequest_(-1),
83 outstandingRecvRequest_(-1)
94 this->outstandingSendRequest_ >= 0
103 this->outstandingSendRequest_ = -1;
107 this->outstandingRecvRequest_ >= 0
116 this->outstandingRecvRequest_ = -1;
129 <<
"On patch of size " << procInterface_.faceCells().size()
130 <<
" between proc " << procInterface_.myProcNo()
131 <<
" and " << procInterface_.neighbProcNo()
132 <<
" outstanding request."
150 <<
"Invalid for non-contiguous data types"
158 const labelList& fc = procInterface_.faceCells();
162 sendBuf_[i] = iF[fc[i]];
167 this->
setSize(sendBuf_.size());
172 procInterface_.neighbProcNo(),
175 procInterface_.tag(),
176 procInterface_.comm()
183 procInterface_.neighbProcNo(),
184 sendBuf_.cdata_bytes(),
185 sendBuf_.size_bytes(),
186 procInterface_.tag(),
187 procInterface_.comm()
203 outstandingRecvRequest_ >= 0
209 outstandingSendRequest_ = -1;
210 outstandingRecvRequest_ = -1;
232 scalarSendBuf_.setSize(fc.
size());
235 scalarSendBuf_[i] = psiInternal[fc[i]];
242 <<
" outstanding request."
248 scalarReceiveBuf_.setSize(scalarSendBuf_.size());
254 procInterface_.neighbProcNo(),
255 scalarReceiveBuf_.data_bytes(),
256 scalarReceiveBuf_.size_bytes(),
257 procInterface_.tag(),
258 procInterface_.comm()
266 procInterface_.neighbProcNo(),
267 scalarSendBuf_.cdata_bytes(),
268 scalarSendBuf_.size_bytes(),
269 procInterface_.tag(),
270 procInterface_.comm()
276 ).updatedMatrix() =
false;
295 result[
faceCells[elemI]] += coeffs[elemI]*vals[elemI];
302 result[
faceCells[elemI]] -= coeffs[elemI]*vals[elemI];
321 if (this->updatedMatrix())
329 outstandingRecvRequest_ >= 0
336 outstandingSendRequest_ = -1;
337 outstandingRecvRequest_ = -1;
341 addToInternalField(result, !
add, coeffs, scalarReceiveBuf_);
346 ).updatedMatrix() =
true;
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Generic templated field type.
void evaluate()
Evaluate boundary conditions.
void setSize(const label n)
Alias for resize()
virtual bool read()
Re-read model coefficients if they have changed.
void size(const label n)
Older name for setAddressableSize.
commsTypes
Types of communications.
@ nonBlocking
"nonBlocking"
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.
A processorFvPatchField type bypassing fvPatch.
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.
void addToInternalField(solveScalarField &result, const bool add, const scalarField &coeffs, const solveScalarField &vals) const
virtual bool ready() const
Is all data available.
virtual tmp< Field< Type > > patchNeighbourField() const
Return neighbour field of internal field.
Abstract base class for coupled patches.
Smooth ATC in cells next to a set of patches supplied by type.
virtual bool write()
Write the output fields.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
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.
An abstract base class for implicitly-coupled interface fields e.g. processor and cyclic patch fields...
An abstract base class for implicitly-coupled interfaces e.g. processor and cyclic patches.
Concrete implementation of processor interface. Used to temporarily store settings.
A class for managing temporary objects.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
To & refCast(From &r)
Reference type cast template function.
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)
points setSize(newPointi)
interfaceProperties interface(alpha1, U, thermo->transportPropertiesDict())
#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.