Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
lduMatrix::solver Class Referenceabstract

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

Inheritance diagram for lduMatrix::solver:
Inheritance graph
[legend]
Collaboration diagram for lduMatrix::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 &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...
 
virtual solverPerformance solve (scalarField &psi, const scalarField &source, const direction cmpt=0) const =0
 
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...
 

Static Public Member Functions

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

virtual void readControls ()
 Read the control parameters from the controlDict_. More...
 

Protected Attributes

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

Abstract base-class for lduMatrix solvers.

Definition at line 93 of file lduMatrix.H.

Constructor & Destructor Documentation

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

Definition at line 136 of file lduMatrixSolver.C.

Referenced by lduMatrix::solver::New().

Here is the caller graph for this function:

virtual ~solver ( )
inlinevirtual

Destructor.

Definition at line 210 of file lduMatrix.H.

Member Function Documentation

void readControls ( )
protectedvirtual

Read the control parameters from the controlDict_.

Reimplemented in smoothSolver, and GAMGPreconditioner.

Definition at line 158 of file lduMatrixSolver.C.

References Foam::e.

Referenced by smoothSolver::readControls(), and GAMGSolver::~GAMGSolver().

Here is the caller graph for this function:

virtual const word& type ( ) const
pure virtual

Runtime type information.

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)   
)
Foam::autoPtr< Foam::lduMatrix::solver > New ( const word fieldName,
const lduMatrix matrix,
const FieldField< Field, scalar > &  interfaceBouCoeffs,
const FieldField< Field, scalar > &  interfaceIntCoeffs,
const lduInterfaceFieldPtrsList interfaces,
const dictionary solverControls 
)
static

Return a new solver.

Definition at line 41 of file lduMatrixSolver.C.

References lduMatrix::asymmetric(), lduMatrix::diagonal(), Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, dictionary::lookup(), Foam::name(), Foam::nl, lduMatrix::solver::solver(), and lduMatrix::symmetric().

Referenced by lduMatrix::preconditioner::preconditioner().

Here is the call graph for this function:

Here is the caller graph for this function:

const word& fieldName ( ) const
inline

Definition at line 218 of file lduMatrix.H.

References lduMatrix::solver::fieldName_.

const lduMatrix& matrix ( ) const
inline

Definition at line 223 of file lduMatrix.H.

References lduMatrix::solver::matrix_.

Referenced by DICPreconditioner::DICPreconditioner(), DILUPreconditioner::DILUPreconditioner(), and lduMatrix::preconditioner::New().

Here is the caller graph for this function:

const FieldField<Field, scalar>& interfaceBouCoeffs ( ) const
inline

Definition at line 228 of file lduMatrix.H.

References lduMatrix::solver::interfaceBouCoeffs_.

const FieldField<Field, scalar>& interfaceIntCoeffs ( ) const
inline

Definition at line 233 of file lduMatrix.H.

References lduMatrix::solver::interfaceIntCoeffs_.

const lduInterfaceFieldPtrsList& interfaces ( ) const
inline

Definition at line 238 of file lduMatrix.H.

References lduMatrix::solver::interfaces_, lduMatrix::solver::normFactor(), psi, lduMatrix::solver::read(), and lduMatrix::solver::solve().

Here is the call graph for this function:

void read ( const dictionary solverControls)
virtual

Read and reset the solver parameters from the given stream.

Reimplemented in diagonalSolver.

Definition at line 167 of file lduMatrixSolver.C.

References lduMatrix::solver::normFactor().

Referenced by lduMatrix::solver::interfaces(), and lduMatrix::preconditioner::~preconditioner().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Implemented in GAMGSolver, PBiCGStab, smoothSolver, PBiCG, PCG, and diagonalSolver.

Referenced by lduMatrix::solver::interfaces().

Here is the caller graph for this function:

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

stopping criterion

Definition at line 175 of file lduMatrixSolver.C.

References Foam::gAverage(), Foam::gSum(), Foam::mag(), and SolverPerformance< Type >::small_.

Referenced by lduMatrix::solver::interfaces(), and lduMatrix::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& matrix_
protected
const FieldField<Field, scalar>& interfaceBouCoeffs_
protected
const FieldField<Field, scalar>& interfaceIntCoeffs_
protected
lduInterfaceFieldPtrsList interfaces_
protected
dictionary controlDict_
protected

Dictionary of controls.

Definition at line 106 of file lduMatrix.H.

Referenced by GAMGSolver::solve().

label maxIter_
protected

Maximum number of iterations in the solver.

Definition at line 109 of file lduMatrix.H.

label minIter_
protected

Minimum number of iterations in the solver.

Definition at line 112 of file lduMatrix.H.

scalar tolerance_
protected

Final convergence tolerance.

Definition at line 115 of file lduMatrix.H.

Referenced by GAMGSolver::solve().

scalar relTol_
protected

Convergence tolerance relative to the initial.

Definition at line 118 of file lduMatrix.H.

Referenced by GAMGSolver::solve().


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