Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
LduMatrix< Type, DType, LUType >::solver Class Referenceabstract

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

Inheritance diagram for LduMatrix< Type, DType, LUType >::solver:
Inheritance graph
[legend]
Collaboration diagram for LduMatrix< Type, DType, LUType >::solver:
Collaboration graph
[legend]

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...
 

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 ( const word fieldName,
const LduMatrix< Type, DType, LUType > &  matrix,
const dictionary solverDict 
)

Definition at line 120 of file LduMatrixSolver.C.

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

Here is the caller graph for this function:

virtual ~solver ( )
inlinevirtual

Definition at line 219 of file LduMatrix.H.

Member Function Documentation

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:

void readControls ( )
protectedvirtual
virtual const word& type ( ) const
pure virtual

Runtime type information.

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)   
)
Foam::autoPtr< typename Foam::LduMatrix< Type, DType, LUType >::solver > New ( const word fieldName,
const LduMatrix< Type, DType, LUType > &  matrix,
const dictionary solverDict 
)
static
const word& fieldName ( ) const
inline

Definition at line 227 of file LduMatrix.H.

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

const LduMatrix<Type, DType, LUType>& matrix ( ) const
inline
void read ( const dictionary solverDict)
virtual
virtual SolverPerformance<Type> solve ( Field< Type > &  psi) const
pure virtual
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 165 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

word fieldName_
protected
const LduMatrix<Type, DType, LUType>& matrix_
protected
dictionary controlDict_
protected
label maxIter_
protected

Maximum number of iterations in the solver.

Definition at line 125 of file LduMatrix.H.

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

label minIter_
protected

Minimum number of iterations in the solver.

Definition at line 128 of file LduMatrix.H.

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

Type tolerance_
protected

Final convergence tolerance.

Definition at line 131 of file LduMatrix.H.

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

Type relTol_
protected

Convergence tolerance relative to the initial.

Definition at line 134 of file LduMatrix.H.

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


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