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
123 forAll(interfaces, interfacei)
125 if (interfaces.set(interfacei))
127 interfaces[interfacei].updateInterfaceMatrix
134 coupleCoeffs[interfacei],
144 bool allUpdated =
false;
150 forAll(interfaces, interfacei)
152 if (interfaces.set(interfacei))
154 if (!interfaces[interfacei].updatedMatrix())
156 if (interfaces[interfacei].ready())
158 interfaces[interfacei].updateInterfaceMatrix
165 coupleCoeffs[interfacei],
200 forAll(interfaces, interfacei)
204 interfaces.set(interfacei)
205 && !interfaces[interfacei].updatedMatrix()
208 interfaces[interfacei].updateInterfaceMatrix
215 coupleCoeffs[interfacei],
224 const lduSchedule& patchSchedule = this->patchSchedule();
227 for (
const auto& sched : patchSchedule)
229 const label interfacei = sched.patch;
231 if (interfaces.set(interfacei))
235 interfaces[interfacei].initInterfaceMatrixUpdate
242 coupleCoeffs[interfacei],
249 interfaces[interfacei].updateInterfaceMatrix
256 coupleCoeffs[interfacei],
268 label interfacei=patchSchedule.size()/2;
269 interfacei<interfaces.size();
273 if (interfaces.set(interfacei))
275 interfaces[interfacei].updateInterfaceMatrix
282 coupleCoeffs[interfacei],
292 <<
"Unsupported communications type " UPtrList< const lduInterfaceField > lduInterfaceFieldPtrsList
List of coupled interface fields to be used in coupling.
void size(const label n)
Older name for setAddressableSize.
"blocking" : (MPI_Bsend, MPI_Recv)
static const Enum< commsTypes > commsTypeNames
Enumerated names for the communication types.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Field< solveScalar > solveScalarField
commsTypes
Types of communications.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
static bool & parRun() noexcept
Test if this a parallel run.
List< lduScheduleEntry > lduSchedule
A List of lduSchedule entries.
A field of fields is a PtrList of fields with reference counting.
const T * set(const label i) const
Return const pointer to element (can be nullptr), or nullptr for out-of-range access (ie...
#define forAll(list, i)
Loop across all elements in list.
const lduSchedule & patchSchedule() const
Return the patch evaluation schedule.
static int nPollProcInterfaces
Number of polling cycles in processor updates.
"scheduled" : (MPI_Send, MPI_Recv)
label size() const noexcept
The number of elements in the list.
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.
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.
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
static void resetRequests(const label n)
Truncate outstanding requests to given length.
static void waitRequests(const label start=0)
Wait until all requests (from start onwards) have finished.
static commsTypes defaultCommsType
Default commsType.
const lduMesh & mesh() const noexcept
Return the LDU mesh from which the addressing is obtained.
const lduAddressing & lduAddr() const
Return the LDU addressing.
"nonBlocking" : (MPI_Isend, MPI_Irecv)