49 forAll(interfaces, interfacei)
51 if (interfaces.
set(interfacei))
53 interfaces[interfacei].initInterfaceMatrixUpdate
60 coupleCoeffs[interfacei],
76 interfacei<interfaces.
size();
80 if (interfaces.
set(interfacei))
82 interfaces[interfacei].initInterfaceMatrixUpdate
89 coupleCoeffs[interfacei],
99 <<
"Unsupported communications type "
114 const label startRequest
119 forAll(interfaces, interfacei)
121 if (interfaces.
set(interfacei))
123 interfaces[interfacei].updateInterfaceMatrix
130 coupleCoeffs[interfacei],
140 bool allUpdated =
false;
146 forAll(interfaces, interfacei)
148 if (interfaces.
set(interfacei))
150 if (!interfaces[interfacei].updatedMatrix())
152 if (interfaces[interfacei].ready())
154 interfaces[interfacei].updateInterfaceMatrix
161 coupleCoeffs[interfacei],
196 forAll(interfaces, interfacei)
200 interfaces.
set(interfacei)
201 && !interfaces[interfacei].updatedMatrix()
204 interfaces[interfacei].updateInterfaceMatrix
211 coupleCoeffs[interfacei],
220 const lduSchedule& patchSchedule = this->patchSchedule();
223 for (
const auto& sched : patchSchedule)
225 const label interfacei = sched.patch;
227 if (interfaces.
set(interfacei))
231 interfaces[interfacei].initInterfaceMatrixUpdate
238 coupleCoeffs[interfacei],
245 interfaces[interfacei].updateInterfaceMatrix
252 coupleCoeffs[interfacei],
264 label interfacei=patchSchedule.
size()/2;
265 interfacei<interfaces.
size();
269 if (interfaces.
set(interfacei))
271 interfaces[interfacei].updateInterfaceMatrix
278 coupleCoeffs[interfacei],
288 <<
"Unsupported communications type "
A field of fields is a PtrList of fields with reference counting.
void size(const label n)
Older name for setAddressableSize.
@ nonBlocking
"nonBlocking"
static const Enum< commsTypes > commsTypeNames
Names of the communication types.
static int nPollProcInterfaces
Number of polling cycles in processor updates.
static void waitRequests(const label start=0)
Wait until all requests (from start onwards) have finished.
static void resetRequests(const label sz)
Truncate number of outstanding requests.
static commsTypes defaultCommsType
Default commsType.
static bool & parRun() noexcept
Test if this a parallel run.
const T * set(const label i) const
label size() const noexcept
The number of elements in the list.
const lduAddressing & lduAddr() const
Return the LDU addressing.
void initMatrixInterfaces(const bool add, const FieldField< Field, scalar > &interfaceCoeffs, const lduInterfaceFieldPtrsList &interfaces, const solveScalarField &psiif, solveScalarField &result, const direction cmpt) const
const lduMesh & mesh() const
Return the LDU mesh from which the addressing is obtained.
const lduSchedule & patchSchedule() const
Return the patch evaluation schedule.
void updateMatrixInterfaces(const bool add, const FieldField< Field, scalar > &interfaceCoeffs, const lduInterfaceFieldPtrsList &interfaces, const solveScalarField &psiif, solveScalarField &result, const direction cmpt, const label startRequest) const
Update interfaced interfaces for matrix operations.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
errorManipArg< error, int > exit(error &err, const int errNo=1)
dict add("bounds", meshBb)
#define forAll(list, i)
Loop across all elements in list.