Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
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:
Inheritance graph
[legend]
Collaboration diagram for smoothSolver:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("smoothSolver")
 
 smoothSolver (const word &fieldName, const lduMatrix &matrix, const FieldField< Field, scalar > &interfaceBouCoeffs, const FieldField< Field, scalar > &interfaceIntCoeffs, const lduInterfaceFieldPtrsList &interfaces, const dictionary &solverControls)
 
virtual ~smoothSolver ()=default
 
virtual solverPerformance solve (scalarField &psi, const scalarField &source, const direction cmpt=0) const
 
- Public Member Functions inherited from lduMatrix::solver
virtual const wordtype () const =0
 
 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 ()=default
 
const wordfieldName () const noexcept
 
const lduMatrixmatrix () const noexcept
 
const FieldField< Field, scalar > & interfaceBouCoeffs () const noexcept
 
const FieldField< Field, scalar > & interfaceIntCoeffs () const noexcept
 
const lduInterfaceFieldPtrsListinterfaces () const noexcept
 
virtual void read (const dictionary &)
 
virtual solverPerformance scalarSolve (solveScalarField &psi, const solveScalarField &source, const direction cmpt=0) const
 
solveScalarField::cmptType normFactor (const solveScalarField &psi, const solveScalarField &source, const solveScalarField &Apsi, solveScalarField &tmpField) const
 

Protected Member Functions

virtual void readControls ()
 

Protected Attributes

label nSweeps_
 
- Protected Attributes inherited from lduMatrix::solver
word fieldName_
 
const lduMatrixmatrix_
 
const FieldField< Field, scalar > & interfaceBouCoeffs_
 
const FieldField< Field, scalar > & interfaceIntCoeffs_
 
lduInterfaceFieldPtrsList interfaces_
 
dictionary controlDict_
 
int log_
 
label minIter_
 
label maxIter_
 
scalar tolerance_
 
scalar relTol_
 
profilingTrigger profiling_
 

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)
 
- Static Protected Attributes inherited from lduMatrix::solver
static const label defaultMaxIter_ = 1000
 

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 55 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 
)

Definition at line 43 of file smoothSolver.C.

◆ ~smoothSolver()

virtual ~smoothSolver ( )
virtualdefault

Member Function Documentation

◆ readControls()

void readControls ( )
protectedvirtual

Reimplemented from lduMatrix::solver.

Definition at line 68 of file smoothSolver.C.

References lduMatrix::solver::controlDict_, dictionary::getOrDefault(), smoothSolver::nSweeps_, and lduMatrix::solver::readControls().

Here is the call graph for this function:

◆ TypeName()

TypeName ( "smoothSolver"  )

◆ solve()

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

Member Data Documentation

◆ nSweeps_

label nSweeps_
protected

Definition at line 64 of file smoothSolver.H.

Referenced by smoothSolver::readControls().


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