51 forAll(interfaces, interfacei)
53 if (interfaces.
set(interfacei))
55 interfaces[interfacei].initInterfaceMatrixUpdate
62 coupleCoeffs[interfacei],
78 interfacei<interfaces.
size();
82 if (interfaces.
set(interfacei))
84 interfaces[interfacei].initInterfaceMatrixUpdate
91 coupleCoeffs[interfacei],
101 <<
"Unsupported communications type "
111 const FieldField<Field, scalar>& coupleCoeffs,
116 const label startRequest
133 DynamicList<int> indices;
152 pollingActive =
false;
154 forAll(interfaces, interfacei)
156 auto* intf = interfaces.get(interfacei);
158 if (intf && !intf->updatedMatrix())
162 intf->updateInterfaceMatrix
169 coupleCoeffs[interfacei],
176 pollingActive =
true;
193 bool allUpdated =
true;
195 forAll(interfaces, interfacei)
197 auto* intf = interfaces.get(interfacei);
199 if (intf && !intf->updatedMatrix())
203 intf->updateInterfaceMatrix
210 coupleCoeffs[interfacei],
247 forAll(interfaces, interfacei)
249 auto* intf = interfaces.get(interfacei);
251 if (intf && (noCheck || !intf->updatedMatrix()))
253 intf->updateInterfaceMatrix
260 coupleCoeffs[interfacei],
269 const lduSchedule& patchSchedule = this->patchSchedule();
272 for (
const auto& sched : patchSchedule)
274 const label interfacei = sched.patch;
276 if (interfaces.set(interfacei))
280 interfaces[interfacei].initInterfaceMatrixUpdate
287 coupleCoeffs[interfacei],
294 interfaces[interfacei].updateInterfaceMatrix
301 coupleCoeffs[interfacei],
313 label interfacei=patchSchedule.size()/2;
314 interfacei<interfaces.size();
318 if (interfaces.set(interfacei))
320 interfaces[interfacei].updateInterfaceMatrix
327 coupleCoeffs[interfacei],
337 <<
"Unsupported communications type "
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
A field of fields is a PtrList of fields with reference counting.
static bool waitSomeRequests(label pos, label len=-1, DynamicList< int > *indices=nullptr)
Wait until some requests (from position onwards) have finished. Corresponds to MPI_Waitsome().
commsTypes
Communications types.
@ scheduled
"scheduled" (MPI standard) : (MPI_Send, MPI_Recv)
@ nonBlocking
"nonBlocking" (immediate) : (MPI_Isend, MPI_Irecv)
@ buffered
"buffered" : (MPI_Bsend, MPI_Recv)
static const Enum< commsTypes > commsTypeNames
Enumerated names for the communication types.
static int nPollProcInterfaces
Number of polling cycles in processor updates.
static void waitRequests()
Wait for all requests to finish.
static commsTypes defaultCommsType
Default commsType.
const T * set(const label i) const
Return const pointer to element (can be nullptr), or nullptr for out-of-range access (ie,...
const T * get(const label i) const
Return const pointer to element (can be nullptr), or nullptr for out-of-range access (ie,...
label size() const noexcept
The number of entries 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
Initialise the update of interfaced interfaces for matrix operations.
const lduSchedule & patchSchedule() const
Return the patch evaluation schedule.
const lduMesh & mesh() const noexcept
Return the LDU mesh from which the addressing is obtained.
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.
List< lduScheduleEntry > lduSchedule
A List of lduSchedule entries.
void add(DimensionedField< scalar, GeoMesh > &result, const dimensioned< scalar > &dt1, const DimensionedField< scalar, GeoMesh > &f2)
Field< solveScalar > solveScalarField
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
errorManipArg< error, int > exit(error &err, const int errNo=1)
UPtrList< const lduInterfaceField > lduInterfaceFieldPtrsList
List of coupled interface fields to be used in coupling.
dict add("bounds", meshBb)
#define forAll(list, i)
Loop across all elements in list.