65#ifndef Foam_distributedDILUPreconditioner_H
66#define Foam_distributedDILUPreconditioner_H
194 const bool cancel =
false
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.
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual void addInterface(solveScalarField &wA, const label inti, const Field< solveScalar > &recvBuf) const
Update preconditioned variable from interface.
virtual void backwardInternal(solveScalarField &wA, const label colouri) const
Update preconditioned variable walking backward on internal faces.
void send(const labelList &selectedInterfaces, const solveScalarField &psiInternal, DynamicList< UPstream::Request > &requests) const
Start sending sendBufs_.
List< DynamicList< label > > higherGlobalSend_
Interfaces to non-processor higher coupled interfaces.
PtrList< FieldField< Field, solveScalar > > colourBufs_
Global interfaces. Per colour the interfaces that (might) influence it.
static autoPtr< labelList > procColoursPtr_
Previous processor colours.
virtual void setFinished(const solverPerformance &perf) const
Signal end of solver.
List< DynamicList< label > > lowerGlobalSend_
Interfaces to non-processor lower coupled interfaces.
const bool coupled_
Precondition across global coupled bc.
virtual ~distributedDILUPreconditioner()
Destructor.
void updateMatrixInterfaces(const bool add, const FieldField< Field, scalar > &coupleCoeffs, const labelList &selectedInterfaces, const solveScalarField &psiif, solveScalarField &result, const direction cmpt) const
Variant of lduMatrix::updateMatrixInterfaces on selected interfaces.
autoPtr< labelList > cellColourPtr_
Local (cell) colouring from global interfaces.
DynamicList< label > lowerNbrs_
Interfaces to lower coloured processors.
List< DynamicList< label > > lowerGlobalRecv_
Interfaces to non-processor lower coupled interfaces.
virtual void forwardInternalDiag(solveScalarField &rD, const label colouri) const
Update diagonal for all faces of a certain colour.
label nColours_
Number of colours (in case of multiple disconnected regions.
virtual void precondition(solveScalarField &wA, const solveScalarField &rA, const direction cmpt=0) const
Return wA the preconditioned form of residual rA.
DynamicList< UPstream::Request > higherSendRequests_
TypeName("distributedDILU")
Runtime type information.
void sendGlobal(const labelList &selectedInterfaces, solveScalarField &psi, const label colouri) const
Send (and store in colourBufs_[colouri]) the effect of.
DynamicList< UPstream::Request > lowerSendRequests_
DynamicList< UPstream::Request > lowerRecvRequests_
List< label > lowerColour_
Corresponding destination colour (for lowerGlobal).
distributedDILUPreconditioner(const lduMatrix::solver &, const dictionary &solverControlsUnused)
Construct from matrix components and preconditioner solver controls.
void receive(const labelList &selectedInterfaces, DynamicList< UPstream::Request > &requests) const
Start receiving in recvBufs_.
virtual void addInterfaceDiag(solveScalarField &rD, const label inti, const Field< solveScalar > &recvBuf) const
Update diagonal for interface.
List< label > higherColour_
Corresponding destination colour (for higherGlobal).
DynamicList< label > higherNbrs_
Interfaces to higher coloured processors.
virtual void calcReciprocalD(solveScalarField &rD) const
Calculate reciprocal of diagonal.
static const lduMesh * meshPtr_
Processor interface buffers and colouring.
DynamicList< UPstream::Request > recvRequests_
FieldField< Field, solveScalar > recvBufs_
virtual void forwardInternal(solveScalarField &wA, const label colouri) const
Update preconditioned variable walking forward on internal faces.
FieldField< Field, solveScalar > sendBufs_
Buffers for sending and receiving data.
solveScalarField rD_
The reciprocal preconditioned diagonal.
DynamicList< UPstream::Request > higherRecvRequests_
List< DynamicList< label > > higherGlobalRecv_
Interfaces to non-processor higher coupled interfaces.
void wait(DynamicList< UPstream::Request > &requests, const bool cancel=false) const
Wait for requests or cancel/free requests.
Abstract base-class for lduMatrix preconditioners.
Abstract base-class for lduMatrix solvers.
Abstract base class for meshes which provide LDU addressing for the construction of lduMatrix and LDU...
const volScalarField & psi
List< label > labelList
A List of labels.
void add(DimensionedField< scalar, GeoMesh > &result, const dimensioned< scalar > &dt1, const DimensionedField< scalar, GeoMesh > &f2)
Field< solveScalar > solveScalarField
SolverPerformance< scalar > solverPerformance
SolverPerformance instantiated for a scalar.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.