lduMatrix::solver Class Referenceabstract

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

Inheritance diagram for lduMatrix::solver:
Collaboration diagram for lduMatrix::solver:

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)
 Construct solver for given field name, matrix etc. More...
 
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 lduMatrix::normTypes normType) const
 Return the matrix norm using the specified norm method. More...
 
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. More...
 

Static Public Member Functions

static autoPtr< solverNew (const word &solverName, 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 of given type. More...
 
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 given dictionary. More...
 

Protected Member Functions

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

Protected Attributes

word fieldName_
 
const lduMatrixmatrix_
 
const FieldField< Field, scalar > & interfaceBouCoeffs_
 
const FieldField< Field, scalar > & interfaceIntCoeffs_
 
lduInterfaceFieldPtrsList interfaces_
 
dictionary controlDict_
 Dictionary of solution controls. More...
 
int log_
 Verbosity level for solver output statements. More...
 
label minIter_
 Minimum number of iterations in the solver. More...
 
label maxIter_
 Maximum number of iterations in the solver. More...
 
lduMatrix::normTypes normType_
 The normalisation type. More...
 
scalar tolerance_
 Final convergence tolerance. More...
 
scalar relTol_
 Convergence tolerance relative to the initial. More...
 
profilingTrigger profiling_
 Profiling instrumentation. More...
 

Detailed Description

Abstract base-class for lduMatrix solvers.

Definition at line 129 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 
)

Construct solver for given field name, matrix etc.

Definition at line 155 of file lduMatrixSolver.C.

◆ ~solver()

virtual ~solver ( )
virtualdefault

Destructor.

Member Function Documentation

◆ readControls()

◆ type()

virtual const word& type ( ) const
pure virtual

Runtime type information.

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

Foam::autoPtr< Foam::lduMatrix::solver > New ( const word solverName,
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 of given type.

Definition at line 38 of file lduMatrixSolver.C.

References lduMatrix::asymmetric(), lduMatrix::diagonal(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, FatalIOErrorInLookup, and lduMatrix::symmetric().

Referenced by viewFactor::calculate().

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

◆ New() [2/2]

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 given dictionary.

Definition at line 130 of file lduMatrixSolver.C.

References dictionary::get(), and Foam::New().

Here is the call graph for this function:

◆ fieldName()

const word& fieldName ( ) const
inlinenoexcept

Definition at line 301 of file lduMatrix.H.

References lduMatrix::solver::fieldName_.

◆ matrix()

◆ interfaceBouCoeffs()

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

Definition at line 311 of file lduMatrix.H.

References lduMatrix::solver::interfaceBouCoeffs_.

Referenced by distributedDILUPreconditioner::distributedDILUPreconditioner().

Here is the caller graph for this function:

◆ interfaceIntCoeffs()

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

Definition at line 316 of file lduMatrix.H.

References lduMatrix::solver::interfaceIntCoeffs_.

◆ interfaces()

const lduInterfaceFieldPtrsList& interfaces ( ) const
inlinenoexcept

Definition at line 321 of file lduMatrix.H.

References lduMatrix::solver::interfaces_.

Referenced by distributedDILUPreconditioner::distributedDILUPreconditioner().

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 204 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 GAMGSolver, PPCG, FPCG, PBiCGStab, parProfilingSolver, PCG, PPCR, smoothSolver, PBiCG, and diagonalSolver.

◆ 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 FPCG, PBiCGStab, and PCG.

Definition at line 212 of file lduMatrixSolver.C.

References psi, refPtr< Container< Type > >::ref(), and Foam::solve().

Here is the call graph for this function:

◆ normFactor() [1/2]

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

Return the matrix norm using the specified norm method.

Definition at line 229 of file lduMatrixSolver.C.

References lduMatrix::DEFAULT_NORM, Foam::gAverage(), Foam::gSum(), lduMatrix::L1_SCALED_NORM, Foam::mag(), lduMatrix::NO_NORM, psi, and SolverPerformance< Type >::small_.

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

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

◆ normFactor() [2/2]

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

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

Definition at line 371 of file lduMatrix.H.

References lduMatrix::solver::normFactor(), and lduMatrix::solver::normType_.

Here is the call graph for this function:

Member Data Documentation

◆ fieldName_

word fieldName_
protected

Definition at line 135 of file lduMatrix.H.

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

◆ matrix_

const lduMatrix& matrix_
protected

Definition at line 136 of file lduMatrix.H.

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

◆ interfaceBouCoeffs_

const FieldField<Field, scalar>& interfaceBouCoeffs_
protected

Definition at line 137 of file lduMatrix.H.

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

◆ interfaceIntCoeffs_

const FieldField<Field, scalar>& interfaceIntCoeffs_
protected

Definition at line 138 of file lduMatrix.H.

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

◆ interfaces_

lduInterfaceFieldPtrsList interfaces_
protected

Definition at line 139 of file lduMatrix.H.

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

◆ controlDict_

dictionary controlDict_
protected

◆ log_

int log_
protected

Verbosity level for solver output statements.

Definition at line 149 of file lduMatrix.H.

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

◆ minIter_

label minIter_
protected

Minimum number of iterations in the solver.

Definition at line 154 of file lduMatrix.H.

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

◆ maxIter_

label maxIter_
protected

Maximum number of iterations in the solver.

Definition at line 159 of file lduMatrix.H.

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

◆ normType_

lduMatrix::normTypes normType_
protected

The normalisation type.

Definition at line 164 of file lduMatrix.H.

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

◆ tolerance_

scalar tolerance_
protected

Final convergence tolerance.

Definition at line 169 of file lduMatrix.H.

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

◆ relTol_

scalar relTol_
protected

Convergence tolerance relative to the initial.

Definition at line 174 of file lduMatrix.H.

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

◆ profiling_

profilingTrigger profiling_
protected

Profiling instrumentation.

Definition at line 179 of file lduMatrix.H.


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