smoothSolver Class Reference

Iterative solver for symmetric and asymmetric matrices which uses a run-time selected smoother e.g. GaussSeidel to converge the solution to the required tolerance. More...

Inheritance diagram for smoothSolver:
Collaboration diagram for smoothSolver:

Public Member Functions

 TypeName ("smoothSolver")
 Runtime type information. More...
 
 smoothSolver (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 ~smoothSolver ()
 Destructor. More...
 
virtual solverPerformance solve (scalarField &psi, const scalarField &source, const direction cmpt=0) const
 Solve the matrix with this solver. 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...
 

Protected Member Functions

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

Protected Attributes

label nSweeps_
 Number of sweeps before the evaluation of residual. 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...
 

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...
 
- Static Protected Attributes inherited from lduMatrix::solver
static const label defaultMaxIter_ = 1000
 Default maximum number of iterations in the solver. More...
 

Detailed Description

Iterative solver for symmetric and asymmetric matrices which uses a run-time selected smoother e.g. GaussSeidel to converge the solution to the required tolerance.

To improve efficiency, the residual is evaluated after every nSweeps smoothing iterations.

Source files

Definition at line 53 of file smoothSolver.H.

Constructor & Destructor Documentation

◆ smoothSolver()

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

Definition at line 45 of file smoothSolver.C.

◆ ~smoothSolver()

virtual ~smoothSolver ( )
inlinevirtual

Destructor.

Definition at line 88 of file smoothSolver.H.

References psi, and smoothSolver::solve().

Here is the call graph for this function:

Member Function Documentation

◆ readControls()

void readControls ( )
protectedvirtual

Read the control parameters from the controlDict_.

Reimplemented from lduMatrix::solver.

Definition at line 70 of file smoothSolver.C.

References lduMatrix::solver::readControls(), and smoothSolver::solve().

Here is the call graph for this function:

◆ TypeName()

TypeName ( "smoothSolver"  )

Runtime type information.

◆ solve()

Member Data Documentation

◆ nSweeps_

label nSweeps_
protected

Number of sweeps before the evaluation of residual.

Definition at line 62 of file smoothSolver.H.


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