LduMatrix< Type, DType, LUType >::solver Class Referenceabstract

Abstract base-class for LduMatrix solvers. More...

Inheritance diagram for LduMatrix< Type, DType, LUType >::solver:
Collaboration diagram for LduMatrix< Type, DType, LUType >::solver:

Public Member Functions

virtual const wordtype () const =0
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, solver, symMatrix,(const word &fieldName, const LduMatrix< Type, DType, LUType > &matrix, const dictionary &solverDict),(fieldName, matrix, solverDict))
 
 declareRunTimeSelectionTable (autoPtr, solver, asymMatrix,(const word &fieldName, const LduMatrix< Type, DType, LUType > &matrix, const dictionary &solverDict),(fieldName, matrix, solverDict))
 
 solver (const word &fieldName, const LduMatrix< Type, DType, LUType > &matrix, const dictionary &solverDict)
 
virtual ~solver ()
 
const wordfieldName () const
 
const LduMatrix< Type, DType, LUType > & matrix () const
 
virtual void read (const dictionary &solverDict)
 Read and reset the solver parameters from the given dictionary. More...
 
virtual SolverPerformance< Type > solve (Field< Type > &psi) const =0
 
Type normFactor (const Field< Type > &psi, const Field< Type > &Apsi, Field< Type > &tmpField) const
 Return the matrix norm used to normalise the residual for the. More...
 

Static Public Member Functions

static autoPtr< solverNew (const word &fieldName, const LduMatrix< Type, DType, LUType > &matrix, const dictionary &solverDict)
 Return a new solver. More...
 

Protected Member Functions

template<class T >
void readControl (const dictionary &controlDict, T &control, const word &controlName)
 Read a control parameter from controlDict. More...
 
virtual void readControls ()
 Read the control parameters from the controlDict_. More...
 

Protected Attributes

word fieldName_
 
const LduMatrix< Type, DType, LUType > & matrix_
 
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...
 
Type tolerance_
 Final convergence tolerance. More...
 
Type relTol_
 Convergence tolerance relative to the initial. More...
 

Static Protected Attributes

static const label defaultMaxIter_ = 1000
 Default maximum number of iterations in the solver. More...
 

Detailed Description

template<class Type, class DType, class LUType>
class Foam::LduMatrix< Type, DType, LUType >::solver

Abstract base-class for LduMatrix solvers.

Definition at line 112 of file LduMatrix.H.

Constructor & Destructor Documentation

◆ solver()

solver ( const word fieldName,
const LduMatrix< Type, DType, LUType > &  matrix,
const dictionary solverDict 
)

Definition at line 123 of file LduMatrixSolver.C.

Referenced by LduMatrix< Type, DType, LUType >::solver::New().

Here is the caller graph for this function:

◆ ~solver()

virtual ~solver ( )
inlinevirtual

Definition at line 222 of file LduMatrix.H.

Member Function Documentation

◆ readControl()

void readControl ( const dictionary controlDict,
T control,
const word controlName 
)
inlineprotected

Read a control parameter from controlDict.

Definition at line 31 of file LduMatrixI.H.

References dictionary::found(), and dictionary::lookup().

Referenced by LduMatrix< Type, DType, LUType >::solver::readControls().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readControls()

◆ type()

virtual const word& type ( ) const
pure virtual

Runtime type information.

◆ declareRunTimeSelectionTable() [1/2]

declareRunTimeSelectionTable ( autoPtr  ,
solver  ,
symMatrix  ,
(const word &fieldName, const LduMatrix< Type, DType, LUType > &matrix, const dictionary &solverDict)  ,
(fieldName, matrix, solverDict)   
)

◆ declareRunTimeSelectionTable() [2/2]

declareRunTimeSelectionTable ( autoPtr  ,
solver  ,
asymMatrix  ,
(const word &fieldName, const LduMatrix< Type, DType, LUType > &matrix, const dictionary &solverDict)  ,
(fieldName, matrix, solverDict)   
)

◆ New()

Foam::autoPtr< typename Foam::LduMatrix< Type, DType, LUType >::solver > New ( const word fieldName,
const LduMatrix< Type, DType, LUType > &  matrix,
const dictionary solverDict 
)
static

◆ fieldName()

const word& fieldName ( ) const
inline

Definition at line 230 of file LduMatrix.H.

References LduMatrix< Type, DType, LUType >::solver::fieldName_.

◆ matrix()

◆ read()

void read ( const dictionary solverDict)
virtual

◆ solve()

◆ normFactor()

Type normFactor ( const Field< Type > &  psi,
const Field< Type > &  Apsi,
Field< Type > &  tmpField 
) const

Return the matrix norm used to normalise the residual for the.

stopping criterion

Definition at line 168 of file LduMatrixSolver.C.

References Foam::cmptMag(), Foam::cmptMultiply(), Foam::gAverage(), Foam::gSum(), LduMatrix< Type, DType, LUType >::solver::matrix_, and Foam::stabilise().

Referenced by LduMatrix< Type, DType, LUType >::solver::matrix(), and LduMatrix< Type, DType, LUType >::solver::read().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ fieldName_

◆ matrix_

◆ controlDict_

◆ defaultMaxIter_

const label defaultMaxIter_ = 1000
staticprotected

Default maximum number of iterations in the solver.

Definition at line 125 of file LduMatrix.H.

◆ maxIter_

label maxIter_
protected

Maximum number of iterations in the solver.

Definition at line 128 of file LduMatrix.H.

Referenced by LduMatrix< Type, DType, LUType >::solver::readControls().

◆ minIter_

label minIter_
protected

Minimum number of iterations in the solver.

Definition at line 131 of file LduMatrix.H.

Referenced by LduMatrix< Type, DType, LUType >::solver::readControls().

◆ tolerance_

Type tolerance_
protected

Final convergence tolerance.

Definition at line 134 of file LduMatrix.H.

Referenced by LduMatrix< Type, DType, LUType >::solver::readControls().

◆ relTol_

Type relTol_
protected

Convergence tolerance relative to the initial.

Definition at line 137 of file LduMatrix.H.

Referenced by LduMatrix< Type, DType, LUType >::solver::readControls().


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