distributedDICPreconditioner Class Reference

Version of DICpreconditioner that uses preconditioning across processor (and coupled) boundaries. Based on 'Parallel Preconditioners' chapter from 'Iterative Methods for Sparse Linear Systems' by Yousef Saad. More...

Inheritance diagram for distributedDICPreconditioner:
Collaboration diagram for distributedDICPreconditioner:

Public Member Functions

 TypeName ("distributedDIC")
 Runtime type information. More...
 
 distributedDICPreconditioner (const lduMatrix::solver &, const dictionary &solverControlsUnused)
 Construct from matrix components and preconditioner solver controls. More...
 
virtual ~distributedDICPreconditioner ()=default
 Destructor. More...
 
- Public Member Functions inherited from distributedDILUPreconditioner
 TypeName ("distributedDILU")
 Runtime type information. More...
 
 distributedDILUPreconditioner (const lduMatrix::solver &, const dictionary &solverControlsUnused)
 Construct from matrix components and preconditioner solver controls. More...
 
virtual ~distributedDILUPreconditioner ()
 Destructor. More...
 
virtual void precondition (solveScalarField &wA, const solveScalarField &rA, const direction cmpt=0) const
 Return wA the preconditioned form of residual rA. More...
 
virtual void setFinished (const solverPerformance &perf) const
 Signal end of solver. More...
 
- Public Member Functions inherited from lduMatrix::preconditioner
virtual const wordtype () const =0
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, preconditioner, symMatrix,(const solver &sol, const dictionary &solverControls),(sol, solverControls))
 
 declareRunTimeSelectionTable (autoPtr, preconditioner, asymMatrix,(const solver &sol, const dictionary &solverControls),(sol, solverControls))
 
 preconditioner (const solver &sol)
 Construct for given solver. More...
 
virtual ~preconditioner ()=default
 Destructor. More...
 
virtual void read (const dictionary &)
 Read and reset the preconditioner parameters from the given stream. More...
 
virtual void preconditionT (solveScalarField &wT, const solveScalarField &rT, const direction cmpt=0) const
 Return wT the transpose-matrix preconditioned form of residual rT. More...
 

Protected Member Functions

virtual void forwardInternalDiag (solveScalarField &rD, const label colouri) const
 Update diagonal for colour. More...
 
virtual void forwardInternal (solveScalarField &wA, const label colouri) const
 Update preconditioned variable walking forward on internal faces. More...
 
- Protected Member Functions inherited from distributedDILUPreconditioner
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. More...
 
void sendGlobal (const labelList &selectedInterfaces, solveScalarField &psi, const label colouri) const
 Send (and store in colourBufs_[colouri]) the effect of. More...
 
void receive (const labelList &selectedInterfaces, DynamicList< UPstream::Request > &requests) const
 Start receiving in recvBufs_. More...
 
void send (const labelList &selectedInterfaces, const solveScalarField &psiInternal, DynamicList< UPstream::Request > &requests) const
 Start sending sendBufs_. More...
 
void wait (DynamicList< UPstream::Request > &requests, const bool cancel=false) const
 Wait for requests or cancel/free requests. More...
 
virtual void addInterfaceDiag (solveScalarField &rD, const label inti, const Field< solveScalar > &recvBuf) const
 Update diagonal for interface. More...
 
virtual void addInterface (solveScalarField &wA, const label inti, const Field< solveScalar > &recvBuf) const
 Update preconditioned variable from interface. More...
 
virtual void backwardInternal (solveScalarField &wA, const label colouri) const
 Update preconditioned variable walking backward on internal faces. More...
 
virtual void calcReciprocalD (solveScalarField &rD) const
 Calculate reciprocal of diagonal. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from lduMatrix::preconditioner
static word getName (const dictionary &)
 Find the preconditioner name (directly or from a sub-dictionary) More...
 
static autoPtr< preconditionerNew (const solver &sol, const dictionary &solverControls)
 Return a new preconditioner. More...
 
- Protected Attributes inherited from distributedDILUPreconditioner
const bool coupled_
 Precondition across global coupled bc. More...
 
FieldField< Field, solveScalar > sendBufs_
 Buffers for sending and receiving data. More...
 
FieldField< Field, solveScalar > recvBufs_
 
DynamicList< UPstream::RequestrecvRequests_
 
DynamicList< label > lowerNbrs_
 Interfaces to lower coloured processors. More...
 
DynamicList< UPstream::RequestlowerSendRequests_
 
DynamicList< UPstream::RequestlowerRecvRequests_
 
DynamicList< label > higherNbrs_
 Interfaces to higher coloured processors. More...
 
DynamicList< UPstream::RequesthigherSendRequests_
 
DynamicList< UPstream::RequesthigherRecvRequests_
 
autoPtr< labelListcellColourPtr_
 Local (cell) colouring from global interfaces. More...
 
label nColours_
 Number of colours (in case of multiple disconnected regions. More...
 
PtrList< FieldField< Field, solveScalar > > colourBufs_
 Global interfaces. Per colour the interfaces that (might) influence it. More...
 
List< DynamicList< label > > lowerGlobalRecv_
 Interfaces to non-processor lower coupled interfaces. More...
 
List< DynamicList< label > > lowerGlobalSend_
 Interfaces to non-processor lower coupled interfaces. More...
 
List< label > lowerColour_
 Corresponding destination colour (for lowerGlobal) More...
 
List< DynamicList< label > > higherGlobalRecv_
 Interfaces to non-processor higher coupled interfaces. More...
 
List< DynamicList< label > > higherGlobalSend_
 Interfaces to non-processor higher coupled interfaces. More...
 
List< label > higherColour_
 Corresponding destination colour (for higherGlobal) More...
 
solveScalarField rD_
 The reciprocal preconditioned diagonal. More...
 
- Protected Attributes inherited from lduMatrix::preconditioner
const solversolver_
 Reference to the base-solver this preconditioner is used with. More...
 
- Static Protected Attributes inherited from distributedDILUPreconditioner
static const lduMeshmeshPtr_ = nullptr
 Processor interface buffers and colouring. More...
 
static autoPtr< labelListprocColoursPtr_
 Previous processor colours. More...
 

Detailed Description

Version of DICpreconditioner that uses preconditioning across processor (and coupled) boundaries. Based on 'Parallel Preconditioners' chapter from 'Iterative Methods for Sparse Linear Systems' by Yousef Saad.

Leaves out the handling of boundary nodes after internal nodes since probably not beneficial (so no overlap of comms and internal calculation)

By default preconditions across coupled boundaries (currently only tested for cyclicAMI). This can be disabled with the 'coupled' setting

solver PCG; preconditioner { preconditioner distributedDIC; coupled false; }

The cyclicAMI boundary behaviour will only work if

  • running non-parallel or
  • different sides of cyclicAMI run on different processors i.e. there is no processor which has cells on both owner and neighbour of the patch pair.
See also
Foam::DICPreconditioner Foam::distributedDILUPreconditioner
Source files

Definition at line 74 of file distributedDICPreconditioner.H.

Constructor & Destructor Documentation

◆ distributedDICPreconditioner()

distributedDICPreconditioner ( const lduMatrix::solver sol,
const dictionary solverControlsUnused 
)

Construct from matrix components and preconditioner solver controls.

Definition at line 119 of file distributedDICPreconditioner.C.

◆ ~distributedDICPreconditioner()

virtual ~distributedDICPreconditioner ( )
virtualdefault

Destructor.

Member Function Documentation

◆ forwardInternalDiag()

void forwardInternalDiag ( solveScalarField rD,
const label  colouri 
) const
protectedvirtual

Update diagonal for colour.

Reimplemented from distributedDILUPreconditioner.

Definition at line 38 of file distributedDICPreconditioner.C.

◆ forwardInternal()

void forwardInternal ( solveScalarField wA,
const label  colouri 
) const
protectedvirtual

Update preconditioned variable walking forward on internal faces.

Reimplemented from distributedDILUPreconditioner.

Definition at line 76 of file distributedDICPreconditioner.C.

References UList< T >::begin().

Here is the call graph for this function:

◆ TypeName()

TypeName ( "distributedDIC"  )

Runtime type information.


The documentation for this class was generated from the following files: