Public Member Functions | Private Member Functions
PCGgpu Class Reference

CPU-based preconditioned conjugate gradient solver for symmetric lduMatrices using a run-time selectable preconditiioner, identical to PCG. More...

Inheritance diagram for PCGgpu:
Inheritance graph
[legend]
Collaboration diagram for PCGgpu:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("PCGgpu")
 Runtime type information. More...
 
 PCGgpu (const word &fieldName, const lduMatrix &matrix, const FieldField< Field, scalar > &interfaceBouCoeffs, const FieldField< Field, scalar > &interfaceIntCoeffs, const lduInterfaceFieldPtrsList &interfaces, const dictionary &solverControls)
 Construct from matrix components and solver data stream. More...
 
virtual solverPerformance solve (scalarField &psi, const scalarField &source, const direction cmpt=0) const
 Solve the matrix with this solver. More...
 
 TypeName ("PCGgpu")
 Runtime type information. More...
 
 PCGgpu (const word &fieldName, const lduMatrix &matrix, const FieldField< Field, scalar > &interfaceBouCoeffs, const FieldField< Field, scalar > &interfaceIntCoeffs, const lduInterfaceFieldPtrsList &interfaces, const dictionary &solverControls)
 Construct from matrix components and solver data stream. More...
 
- Public Member Functions inherited from PCG
 TypeName ("PCG")
 Runtime type information. More...
 
 PCG (const word &fieldName, const lduMatrix &matrix, const FieldField< Field, scalar > &interfaceBouCoeffs, const FieldField< Field, scalar > &interfaceIntCoeffs, const lduInterfaceFieldPtrsList &interfaces, const dictionary &solverControls)
 Construct from matrix components and solver controls. More...
 
virtual ~PCG ()
 Destructor. More...
 
- Public Member Functions inherited from lduMatrix::solver
virtual const wordtype () const =0
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, solver, symMatrix,(const word &fieldName, const lduMatrix &matrix, const FieldField< Field, scalar > &interfaceBouCoeffs, const FieldField< Field, scalar > &interfaceIntCoeffs, const lduInterfaceFieldPtrsList &interfaces, const dictionary &solverControls),(fieldName, matrix, interfaceBouCoeffs, interfaceIntCoeffs, interfaces, solverControls))
 
 declareRunTimeSelectionTable (autoPtr, solver, asymMatrix,(const word &fieldName, const lduMatrix &matrix, const FieldField< Field, scalar > &interfaceBouCoeffs, const FieldField< Field, scalar > &interfaceIntCoeffs, const lduInterfaceFieldPtrsList &interfaces, const dictionary &solverControls),(fieldName, matrix, interfaceBouCoeffs, interfaceIntCoeffs, interfaces, solverControls))
 
 solver (const word &fieldName, const lduMatrix &matrix, const FieldField< Field, scalar > &interfaceBouCoeffs, const FieldField< Field, scalar > &interfaceIntCoeffs, const lduInterfaceFieldPtrsList &interfaces, const dictionary &solverControls)
 
virtual ~solver ()
 Destructor. More...
 
const wordfieldName () const
 
const lduMatrixmatrix () const
 
const FieldField< Field, scalar > & interfaceBouCoeffs () const
 
const FieldField< Field, scalar > & interfaceIntCoeffs () const
 
const lduInterfaceFieldPtrsListinterfaces () const
 
virtual void read (const dictionary &)
 Read and reset the solver parameters from the given stream. More...
 
scalar normFactor (const scalarField &psi, const scalarField &source, const scalarField &Apsi, scalarField &tmpField) const
 Return the matrix norm used to normalise the residual for the. More...
 

Private Member Functions

 PCGgpu (const PCGgpu &)
 Disallow default bitwise copy construct. More...
 
void operator= (const PCGgpu &)
 Disallow default bitwise assignment. More...
 
 PCGgpu (const PCGgpu &)
 Disallow default bitwise copy construct. More...
 
void operator= (const PCGgpu &)
 Disallow default bitwise assignment. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from lduMatrix::solver
static autoPtr< solverNew (const word &fieldName, const lduMatrix &matrix, const FieldField< Field, scalar > &interfaceBouCoeffs, const FieldField< Field, scalar > &interfaceIntCoeffs, const lduInterfaceFieldPtrsList &interfaces, const dictionary &solverControls)
 Return a new solver. More...
 
- Protected Member Functions inherited from lduMatrix::solver
virtual void readControls ()
 Read the control parameters from the controlDict_. More...
 
- Protected Attributes inherited from lduMatrix::solver
word fieldName_
 
const lduMatrixmatrix_
 
const FieldField< Field, scalar > & interfaceBouCoeffs_
 
const FieldField< Field, scalar > & interfaceIntCoeffs_
 
lduInterfaceFieldPtrsList interfaces_
 
dictionary controlDict_
 Dictionary of controls. More...
 
label maxIter_
 Maximum number of iterations in the solver. More...
 
label minIter_
 Minimum number of iterations in the solver. More...
 
scalar tolerance_
 Final convergence tolerance. More...
 
scalar relTol_
 Convergence tolerance relative to the initial. More...
 

Detailed Description

CPU-based preconditioned conjugate gradient solver for symmetric lduMatrices using a run-time selectable preconditiioner, identical to PCG.

Source files

Source files

Definition at line 46 of file PCGgpu.H.

Constructor & Destructor Documentation

◆ PCGgpu() [1/4]

PCGgpu ( const PCGgpu )
private

Disallow default bitwise copy construct.

◆ PCGgpu() [2/4]

PCGgpu ( const word fieldName,
const lduMatrix matrix,
const FieldField< Field, scalar > &  interfaceBouCoeffs,
const FieldField< Field, scalar > &  interfaceIntCoeffs,
const lduInterfaceFieldPtrsList interfaces,
const dictionary solverControls 
)

Construct from matrix components and solver data stream.

Definition at line 42 of file PCGgpu.C.

◆ PCGgpu() [3/4]

PCGgpu ( const PCGgpu )
private

Disallow default bitwise copy construct.

◆ PCGgpu() [4/4]

PCGgpu ( const word fieldName,
const lduMatrix matrix,
const FieldField< Field, scalar > &  interfaceBouCoeffs,
const FieldField< Field, scalar > &  interfaceIntCoeffs,
const lduInterfaceFieldPtrsList interfaces,
const dictionary solverControls 
)

Construct from matrix components and solver data stream.

Member Function Documentation

◆ operator=() [1/2]

void operator= ( const PCGgpu )
private

Disallow default bitwise assignment.

◆ TypeName() [1/2]

TypeName ( "PCGgpu"  )

Runtime type information.

◆ solve()

Foam::solverPerformance solve ( scalarField psi,
const scalarField source,
const direction  cmpt = 0 
) const
virtual

Solve the matrix with this solver.

Reimplemented from PCG.

Definition at line 66 of file PCGgpu.C.

References UList::begin(), lduAddressing::losortAddr(), lduAddressing::losortStartAddr(), lduAddressing::lowerAddr(), lduAddressing::ownerStartAddr(), psi, UList::size(), and lduAddressing::upperAddr().

Here is the call graph for this function:

◆ operator=() [2/2]

void operator= ( const PCGgpu )
private

Disallow default bitwise assignment.

◆ TypeName() [2/2]

TypeName ( "PCGgpu"  )

Runtime type information.


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