41 Pstream::defaultCommsType == Pstream::commsTypes::blocking
42 || Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
45 forAll(interfaces, interfacei)
47 if (interfaces.
set(interfacei))
49 interfaces[interfacei].initInterfaceMatrixUpdate
53 coupleCoeffs[interfacei],
55 Pstream::defaultCommsType
60 else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled)
62 const lduSchedule& patchSchedule = this->patchSchedule();
69 interfacei<interfaces.
size();
73 if (interfaces.
set(interfacei))
75 interfaces[interfacei].initInterfaceMatrixUpdate
79 coupleCoeffs[interfacei],
81 Pstream::commsTypes::blocking
89 <<
"Unsupported communications type " 90 << Pstream::commsTypeNames[Pstream::defaultCommsType]
105 if (Pstream::defaultCommsType == Pstream::commsTypes::blocking)
107 forAll(interfaces, interfacei)
109 if (interfaces.
set(interfacei))
111 interfaces[interfacei].updateInterfaceMatrix
115 coupleCoeffs[interfacei],
117 Pstream::defaultCommsType
122 else if (Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking)
125 bool allUpdated =
false;
127 for (
label i=0; i<UPstream::nPollProcInterfaces; i++)
131 forAll(interfaces, interfacei)
133 if (interfaces.
set(interfacei))
135 if (!interfaces[interfacei].updatedMatrix())
137 if (interfaces[interfacei].ready())
139 interfaces[interfacei].updateInterfaceMatrix
143 coupleCoeffs[interfacei],
145 Pstream::defaultCommsType
163 if (Pstream::parRun())
172 UPstream::resetRequests(0);
177 UPstream::waitRequests();
182 forAll(interfaces, interfacei)
186 interfaces.
set(interfacei)
187 && !interfaces[interfacei].updatedMatrix()
190 interfaces[interfacei].updateInterfaceMatrix
194 coupleCoeffs[interfacei],
196 Pstream::defaultCommsType
201 else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled)
203 const lduSchedule& patchSchedule = this->patchSchedule();
208 label interfacei = patchSchedule[i].patch;
210 if (interfaces.
set(interfacei))
212 if (patchSchedule[i].init)
214 interfaces[interfacei].initInterfaceMatrixUpdate
218 coupleCoeffs[interfacei],
220 Pstream::commsTypes::scheduled
225 interfaces[interfacei].updateInterfaceMatrix
229 coupleCoeffs[interfacei],
231 Pstream::commsTypes::scheduled
242 interfacei<interfaces.
size();
246 if (interfaces.
set(interfacei))
248 interfaces[interfacei].updateInterfaceMatrix
252 coupleCoeffs[interfacei],
254 Pstream::commsTypes::blocking
262 <<
"Unsupported communications type " 263 << Pstream::commsTypeNames[Pstream::defaultCommsType]
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void size(const label)
Override size to be inconsistent with allocated storage.
void initMatrixInterfaces(const FieldField< Field, scalar > &interfaceCoeffs, const lduInterfaceFieldPtrsList &interfaces, const scalarField &psiif, scalarField &result, const direction cmpt) const
Initialise the update of interfaced interfaces.
void updateMatrixInterfaces(const FieldField< Field, scalar > &interfaceCoeffs, const lduInterfaceFieldPtrsList &interfaces, const scalarField &psiif, scalarField &result, const direction cmpt) const
Update interfaced interfaces for matrix operations.
bool set(const label) const
Is element set.
label size() const
Return the number of elements in the UPtrList.