34template<
class Type,
class DType,
class LUType>
45 Pstream::defaultCommsType == Pstream::commsTypes::blocking
46 || Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
49 forAll(interfaces_, interfacei)
51 if (interfaces_.set(interfacei))
53 interfaces_[interfacei].initInterfaceMatrixUpdate
60 interfaceCoeffs[interfacei],
62 Pstream::defaultCommsType
67 else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled)
69 const lduSchedule& patchSchedule = this->patchSchedule();
75 label interfacei=patchSchedule.
size()/2;
76 interfacei<interfaces_.size();
80 if (interfaces_.set(interfacei))
82 interfaces_[interfacei].initInterfaceMatrixUpdate
89 interfaceCoeffs[interfacei],
91 Pstream::commsTypes::blocking
99 <<
"Unsupported communications type "
100 << Pstream::commsTypeNames[Pstream::defaultCommsType]
106template<
class Type,
class DType,
class LUType>
117 Pstream::defaultCommsType == Pstream::commsTypes::blocking
118 || Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
122 if (Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking)
124 IPstream::waitRequests();
125 OPstream::waitRequests();
128 forAll(interfaces_, interfacei)
130 if (interfaces_.set(interfacei))
132 interfaces_[interfacei].updateInterfaceMatrix
139 interfaceCoeffs[interfacei],
141 Pstream::defaultCommsType
146 else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled)
148 const lduSchedule& patchSchedule = this->patchSchedule();
151 for (
const auto& schedEval : patchSchedule)
153 const label interfacei = schedEval.patch;
155 if (interfaces_.set(interfacei))
159 interfaces_[interfacei].initInterfaceMatrixUpdate
166 interfaceCoeffs[interfacei],
168 Pstream::commsTypes::scheduled
173 interfaces_[interfacei].updateInterfaceMatrix
180 interfaceCoeffs[interfacei],
182 Pstream::commsTypes::scheduled
192 label interfacei=patchSchedule.
size()/2;
193 interfacei<interfaces_.size();
197 if (interfaces_.set(interfacei))
199 interfaces_[interfacei].updateInterfaceMatrix
206 interfaceCoeffs[interfacei],
208 Pstream::commsTypes::blocking
216 <<
"Unsupported communications type "
217 << Pstream::commsTypeNames[Pstream::defaultCommsType]
A field of fields is a PtrList of fields with reference counting.
Generic templated field type.
void updateMatrixInterfaces(const bool add, const FieldField< Field, LUType > &interfaceCoeffs, const Field< Type > &psiif, Field< Type > &result) const
Update interfaced interfaces for matrix operations.
void initMatrixInterfaces(const bool add, const FieldField< Field, LUType > &interfaceCoeffs, const Field< Type > &psiif, Field< Type > &result) const
Initialise the update of interfaced interfaces.
void size(const label n)
Older name for setAddressableSize.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
errorManipArg< error, int > exit(error &err, const int errNo=1)
dict add("bounds", meshBb)
#define forAll(list, i)
Loop across all elements in list.