FreeFOAM The Cross-Platform CFD Toolkit
smoothSolver Class Reference

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

#include <OpenFOAM/smoothSolver.H>


Detailed Description

Iterative solver for symmetric and assymetric 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 54 of file smoothSolver.H.

+ Inheritance diagram for smoothSolver:
+ Collaboration diagram for smoothSolver:

List of all members.

Public Member Functions

 TypeName ("smoothSolver")
 Runtime type information.
 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.
virtual ~smoothSolver ()
virtual
lduMatrix::solverPerformance 
solve (scalarField &psi, const scalarField &source, const direction cmpt=0) const
 Solve the matrix with this solver.
- Public Member Functions inherited from lduMatrix::solver
virtual const wordtype () const =0
 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))
 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 ()
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.
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.

Protected Member Functions

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

Protected Attributes

label nSweeps_
 Number of sweeps before the evaluation of residual.
- 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
label maxIter_
 Maximum number of iterations in the solver.
scalar tolerance_
 Final convergence tolerance.
scalar relTol_
 Convergence tolerance relative to the initial.

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.

Constructor & Destructor Documentation

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.

virtual ~smoothSolver ( )
inlinevirtual

Definition at line 90 of file smoothSolver.H.


Member Function Documentation

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::controlDict_, dictionary::lookupOrDefault(), and smoothSolver::nSweeps_.

TypeName ( "smoothSolver"  )

Runtime type information.


Member Data Documentation

label nSweeps_
protected

Number of sweeps before the evaluation of residual.

Definition at line 63 of file smoothSolver.H.

Referenced by smoothSolver::readControls().


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