31 template<
class Type,
class DType,
class LUType>
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 interfaceCoeffs[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 interfaceCoeffs[interfacei],
81 Pstream::commsTypes::blocking
89 <<
"Unsupported communications type " 90 << Pstream::commsTypeNames[Pstream::defaultCommsType]
96 template<
class Type,
class DType,
class LUType>
106 Pstream::defaultCommsType == Pstream::commsTypes::blocking
107 || Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking
111 if (Pstream::defaultCommsType == Pstream::commsTypes::nonBlocking)
113 IPstream::waitRequests();
114 OPstream::waitRequests();
117 forAll(interfaces_, interfacei)
119 if (interfaces_.set(interfacei))
121 interfaces_[interfacei].updateInterfaceMatrix
125 interfaceCoeffs[interfacei],
127 Pstream::defaultCommsType
132 else if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled)
134 const lduSchedule& patchSchedule = this->patchSchedule();
139 label interfacei = patchSchedule[i].patch;
141 if (interfaces_.set(interfacei))
143 if (patchSchedule[i].init)
145 interfaces_[interfacei].initInterfaceMatrixUpdate
149 interfaceCoeffs[interfacei],
151 Pstream::commsTypes::scheduled
156 interfaces_[interfacei].updateInterfaceMatrix
160 interfaceCoeffs[interfacei],
162 Pstream::commsTypes::scheduled
173 interfacei<interfaces_.size();
177 if (interfaces_.set(interfacei))
179 interfaces_[interfacei].updateInterfaceMatrix
183 interfaceCoeffs[interfacei],
185 Pstream::commsTypes::blocking
193 <<
"Unsupported communications type " 194 << Pstream::commsTypeNames[Pstream::defaultCommsType]
#define forAll(list, i)
Loop across all elements in list.
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, LUType > &interfaceCoeffs, const Field< Type > &psiif, Field< Type > &result) const
Initialise the update of interfaced interfaces.
Pre-declare SubField and related Field type.
void updateMatrixInterfaces(const FieldField< Field, LUType > &interfaceCoeffs, const Field< Type > &psiif, Field< Type > &result) const
Update interfaced interfaces for matrix operations.