34template<
class Type,
class DType,
class LUType>
51 forAll(interfaces_, interfacei)
53 if (interfaces_.set(interfacei))
55 interfaces_[interfacei].initInterfaceMatrixUpdate
62 interfaceCoeffs[interfacei],
77 interfacei<interfaces_.size();
81 if (interfaces_.set(interfacei))
83 interfaces_[interfacei].initInterfaceMatrixUpdate
90 interfaceCoeffs[interfacei],
106template<
class Type,
class DType,
class LUType>
110 const FieldField<Field, LUType>& interfaceCoeffs,
111 const Field<Type>& psiif,
113 const label startRequest
116 const UPstream::commsTypes commsType = UPstream::defaultCommsType;
120 commsType == UPstream::commsTypes::nonBlocking
121 && UPstream::nPollProcInterfaces
130 DynamicList<int> indices;
134 bool pollingActive = (UPstream::nPollProcInterfaces < 0);
137 && UPstream::waitSomeRequests(startRequest, -1, &indices)
142 pollingActive =
false;
144 forAll(interfaces_, interfacei)
146 auto* intf = interfaces_.get(interfacei);
148 if (intf && !intf->updatedMatrix())
152 intf->updateInterfaceMatrix
159 interfaceCoeffs[interfacei],
165 pollingActive =
true;
175 commsType == UPstream::commsTypes::buffered
176 || commsType == UPstream::commsTypes::nonBlocking
181 if (commsType == UPstream::commsTypes::nonBlocking)
183 UPstream::waitRequests(startRequest);
187 const bool noCheck = (commsType == UPstream::commsTypes::buffered);
189 forAll(interfaces_, interfacei)
191 auto* intf = interfaces_.get(interfacei);
193 if (intf && (noCheck || !intf->updatedMatrix()))
195 intf->updateInterfaceMatrix
202 interfaceCoeffs[interfacei],
208 else if (commsType == UPstream::commsTypes::scheduled)
210 const lduSchedule& patchSchedule = this->patchSchedule();
213 for (
const auto& schedEval : patchSchedule)
215 const label interfacei = schedEval.patch;
217 if (interfaces_.set(interfacei))
221 interfaces_[interfacei].initInterfaceMatrixUpdate
228 interfaceCoeffs[interfacei],
234 interfaces_[interfacei].updateInterfaceMatrix
241 interfaceCoeffs[interfacei],
252 label interfacei=patchSchedule.size()/2;
253 interfacei<interfaces_.size();
257 if (interfaces_.set(interfacei))
259 interfaces_[interfacei].updateInterfaceMatrix
266 interfaceCoeffs[interfacei],
267 UPstream::commsTypes::buffered
void updateMatrixInterfaces(const bool add, const FieldField< Field, LUType > &interfaceCoeffs, const Field< Type > &psiif, Field< Type > &result, const label startRequest) 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 add(DimensionedField< scalar, GeoMesh > &result, const dimensioned< scalar > &dt1, const DimensionedField< scalar, GeoMesh > &f2)