52 procInterface_(ptf.procInterface_),
63 return UPstream::finishedRequestPair(recvRequest_, sendRequest_);
70 const bool ok = UPstream::finishedRequest(recvRequest_);
74 if (UPstream::finishedRequest(sendRequest_)) sendRequest_ = -1;
85 const lduAddressing& lduAddr,
90 const Pstream::commsTypes commsType
93 if (!this->all_ready())
96 <<
"Outstanding request(s) on interface " 107 scalarSendBuf_[i] = psiInternal[fc[i]];
110 scalarRecvBuf_.resize_nocopy(scalarSendBuf_.size());
112 recvRequest_ = UPstream::nRequests();
115 UPstream::commsTypes::nonBlocking,
116 procInterface_.neighbProcNo(),
117 scalarRecvBuf_.data_bytes(),
118 scalarRecvBuf_.size_bytes(),
119 procInterface_.tag(),
120 procInterface_.comm()
123 sendRequest_ = UPstream::nRequests();
126 UPstream::commsTypes::nonBlocking,
127 procInterface_.neighbProcNo(),
128 scalarSendBuf_.cdata_bytes(),
129 scalarSendBuf_.size_bytes(),
130 procInterface_.tag(),
131 procInterface_.comm()
134 this->updatedMatrix(
false);
153 result[
faceCells[elemI]] += coeffs[elemI]*vals[elemI];
160 result[faceCells[elemI]] -= coeffs[elemI]*vals[elemI];
171 const lduAddressing& lduAddr,
176 const Pstream::commsTypes commsType
179 if (this->updatedMatrix())
187 UPstream::waitRequest(recvRequest_); recvRequest_ = -1;
188 if (UPstream::finishedRequest(sendRequest_)) sendRequest_ = -1;
193 addToInternalField(result, !
add, coeffs, scalarRecvBuf_);
195 this->updatedMatrix(
true);
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.
Field< solveScalar > solveScalarField
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Type & refCast(U &obj)
A dynamic_cast (for references) to Type reference.
An abstract base class for implicitly-coupled interface fields e.g. processor and cyclic patch fields...
void resize_nocopy(const label len)
Adjust allocated size of list without necessarily.
interfaceProperties interface(alpha1, U, thermo->transportPropertiesDict())
Smooth ATC in cells next to a set of patches supplied by type.
#define forAll(list, i)
Loop across all elements in list.
void write(vtk::formatter &fmt, const Type &val, const label n=1)
Component-wise write of a value (N times)
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 bool all_ready() const
Receive and send requests have both completed.
lduCalculatedProcessorField(const lduInterface &interface)
Construct from ldu interface.
void addToInternalField(solveScalarField &result, const bool add, const scalarField &coeffs, const solveScalarField &vals) const
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
errorManip< error > abort(error &err)
virtual bool ready() const
Are all (receive) data available?
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
Concrete implementation of processor interface. Used to temporarily store settings.
An abstract base class for implicitly-coupled interfaces e.g. processor and cyclic patches...
A lduProcessorField type bypassing coupledFvPatchField.
List< label > labelList
A List of labels.