lduMatrix::solver Class Referenceabstract

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

Inheritance diagram for lduMatrix::solver:
[legend]
Collaboration diagram for lduMatrix::solver:
[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 ()=default
 Destructor. More...
 
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 &)
 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
 Solve with given field and rhs. More...
 
virtual solverPerformance scalarSolve (solveScalarField &psi, const solveScalarField &source, const direction cmpt=0) const
 Solve with given field and rhs (in solveScalar precision). More...
 
solveScalarField::cmptType normFactor (const solveScalarField &psi, const solveScalarField &source, const solveScalarField &Apsi, solveScalarField &tmpField) const
 

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...
 
int log_
 Level of verbosity in the solver output statements. More...
 
label minIter_
 Minimum number of iterations in the solver. More...
 
label maxIter_
 Maximum number of iterations in the solver. More...
 
scalar tolerance_
 Final convergence tolerance. More...
 
scalar relTol_
 Convergence tolerance relative to the initial. More...
 
profilingTrigger profiling_
 

Static Protected Attributes

static const label defaultMaxIter_ = 1000
 Default maximum number of iterations in the solver. More...
 

Detailed Description

Abstract base-class for lduMatrix solvers.

Definition at line 98 of file lduMatrix.H.

Constructor & Destructor Documentation

◆ solver()

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 139 of file lduMatrixSolver.C.

References lduMatrix::solver::readControls().

Here is the call graph for this function:

◆ ~solver()

virtual ~solver ( )
virtualdefault

Destructor.

Member Function Documentation

◆ readControls()

void readControls ( )
protectedvirtual

Read the control parameters from the controlDict_.

Reimplemented in GAMGPreconditioner, and smoothSolver.

Definition at line 163 of file lduMatrixSolver.C.

References e.

Referenced by smoothSolver::readControls(), and lduMatrix::solver::solver().

Here is the caller graph for this function:

◆ type()

virtual const word & type ( ) const
pure virtual

Runtime type information.

Referenced by GAMGSolver::GAMGSolver().

Here is the caller graph for this function:

◆ declareRunTimeSelectionTable() [1/2]

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() [2/2]

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

◆ New()

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 44 of file lduMatrixSolver.C.

References lduMatrix::asymmetric(), lduMatrix::diagonal(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, FatalIOErrorInLookup, lduMatrix::solver::fieldName(), dictionary::get(), lduMatrix::solver::interfaceBouCoeffs(), lduMatrix::solver::interfaceIntCoeffs(), lduMatrix::solver::interfaces(), lduMatrix::solver::matrix(), Foam::name(), and lduMatrix::symmetric().

Here is the call graph for this function:

◆ fieldName()

const word & fieldName ( ) const
inlinenoexcept

Definition at line 228 of file lduMatrix.H.

References lduMatrix::solver::fieldName_.

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

Here is the caller graph for this function:

◆ matrix()

const lduMatrix & matrix ( ) const
inlinenoexcept

◆ interfaceBouCoeffs()

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

Definition at line 238 of file lduMatrix.H.

References lduMatrix::solver::interfaceBouCoeffs_.

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

Here is the caller graph for this function:

◆ interfaceIntCoeffs()

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

Definition at line 243 of file lduMatrix.H.

References lduMatrix::solver::interfaceIntCoeffs_.

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

Here is the caller graph for this function:

◆ interfaces()

const lduInterfaceFieldPtrsList & interfaces ( ) const
inlinenoexcept

Definition at line 248 of file lduMatrix.H.

References lduMatrix::solver::interfaces_.

Referenced by GAMGSolver::GAMGSolver(), and lduMatrix::solver::New().

Here is the caller graph for this function:

◆ read()

void read ( const dictionary solverControls)
virtual

Read and reset the solver parameters from the given stream.

Reimplemented in diagonalSolver.

Definition at line 173 of file lduMatrixSolver.C.

◆ solve()

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

Solve with given field and rhs.

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

◆ scalarSolve()

Foam::solverPerformance scalarSolve ( solveScalarField psi,
const solveScalarField source,
const direction  cmpt = 0 
) const
virtual

Solve with given field and rhs (in solveScalar precision).

Default is to call solve routine

Reimplemented in PBiCGStab, and PCG.

Definition at line 180 of file lduMatrixSolver.C.

References psi, refPtr< T >::ref(), and solve().

Here is the call graph for this function:

◆ normFactor()

Foam::solveScalarField::cmptType normFactor ( const solveScalarField psi,
const solveScalarField source,
const solveScalarField Apsi,
solveScalarField tmpField 
) const

Return the matrix norm used to normalise the residual for the stopping criterion

Definition at line 197 of file lduMatrixSolver.C.

References faMesh::comm(), Foam::gAverage(), Foam::gSum(), Foam::mag(), DimensionedField< Type, GeoMesh >::mesh(), psi, and SolverPerformance< Type >::small_.

Referenced by GAMGSolver::solve().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ defaultMaxIter_

const Foam::label defaultMaxIter_ = 1000
staticprotected

Default maximum number of iterations in the solver.

Definition at line 105 of file lduMatrix.H.

◆ fieldName_

word fieldName_
protected

Definition at line 107 of file lduMatrix.H.

Referenced by lduMatrix::solver::fieldName(), and GAMGSolver::solve().

◆ matrix_

const lduMatrix& matrix_
protected

Definition at line 108 of file lduMatrix.H.

Referenced by lduMatrix::solver::matrix(), and GAMGSolver::solve().

◆ interfaceBouCoeffs_

const FieldField<Field, scalar>& interfaceBouCoeffs_
protected

Definition at line 109 of file lduMatrix.H.

Referenced by lduMatrix::solver::interfaceBouCoeffs(), and GAMGSolver::solve().

◆ interfaceIntCoeffs_

const FieldField<Field, scalar>& interfaceIntCoeffs_
protected

Definition at line 110 of file lduMatrix.H.

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

◆ interfaces_

lduInterfaceFieldPtrsList interfaces_
protected

Definition at line 111 of file lduMatrix.H.

Referenced by lduMatrix::solver::interfaces(), and GAMGSolver::solve().

◆ controlDict_

dictionary controlDict_
protected

Dictionary of controls.

Definition at line 114 of file lduMatrix.H.

Referenced by GAMGSolver::GAMGSolver().

◆ log_

int log_
protected

Level of verbosity in the solver output statements.

Definition at line 117 of file lduMatrix.H.

Referenced by GAMGSolver::GAMGSolver(), and GAMGSolver::solve().

◆ minIter_

label minIter_
protected

Minimum number of iterations in the solver.

Definition at line 120 of file lduMatrix.H.

Referenced by GAMGSolver::solve().

◆ maxIter_

label maxIter_
protected

Maximum number of iterations in the solver.

Definition at line 123 of file lduMatrix.H.

Referenced by GAMGSolver::solve().

◆ tolerance_

scalar tolerance_
protected

Final convergence tolerance.

Definition at line 126 of file lduMatrix.H.

Referenced by GAMGSolver::GAMGSolver(), and GAMGSolver::solve().

◆ relTol_

scalar relTol_
protected

Convergence tolerance relative to the initial.

Definition at line 129 of file lduMatrix.H.

Referenced by GAMGSolver::GAMGSolver(), and GAMGSolver::solve().

◆ profiling_

profilingTrigger profiling_
protected

Definition at line 131 of file lduMatrix.H.


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