Loading...
Searching...
No Matches
lduMatrix::solver Class Referenceabstract

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

#include <lduMatrix.H>

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

Public Member Functions

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)
 Construct solver for given field name, matrix etc.
virtual ~solver ()=default
 Destructor.
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.
virtual solverPerformance solve (scalarField &psi, const scalarField &source, const direction cmpt=0) const =0
 Solve with given field and rhs.
virtual solverPerformance scalarSolve (solveScalarField &psi, const solveScalarField &source, const direction cmpt=0) const
 Solve with given field and rhs (in solveScalar precision).
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.
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.

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

Protected Member Functions

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

Protected Attributes

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

Detailed Description

Abstract base-class for lduMatrix solvers.

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

◆ ~solver()

virtual ~solver ( )
virtualdefault

Destructor.

Member Function Documentation

◆ readControls()

void readControls ( )
protectedvirtual

Read the control parameters from controlDict_.

Reimplemented in GAMGPreconditioner, and smoothSolver.

Definition at line 186 of file lduMatrixSolver.C.

References controlDict_, lduMatrix::DEFAULT_NORM, lduMatrix::defaultMaxIter, lduMatrix::defaultTolerance, log_, maxIter_, minIter_, normType_, lduMatrix::normTypesNames_, relTol_, and tolerance_.

Referenced by GAMGSolver::GAMGSolver(), read(), GAMGPreconditioner::readControls(), smoothSolver::readControls(), and 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)  )

References fieldName(), interfaceBouCoeffs(), interfaceIntCoeffs(), interfaces(), lduMatrix::lduMatrix(), matrix(), and solver().

Here is the call graph for this function:

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

References fieldName(), interfaceBouCoeffs(), interfaceIntCoeffs(), interfaces(), lduMatrix::lduMatrix(), matrix(), and solver().

Here is the call graph for this function:

◆ 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

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

References fieldName(), dictionary::get(), interfaceBouCoeffs(), interfaceIntCoeffs(), interfaces(), lduMatrix::lduMatrix(), matrix(), and Foam::New().

Here is the call graph for this function:

◆ fieldName()

◆ matrix()

◆ interfaceBouCoeffs()

◆ interfaceIntCoeffs()

◆ interfaces()

◆ 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.

References controlDict_, and readControls().

Here is the call graph for this function:

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

References psi.

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

References psi, refPtr< T >::ref(), and 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 228 of file lduMatrixSolver.C.

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

Referenced by normFactor(), FPCG::scalarSolve(), PBiCGStab::scalarSolve(), PCG::scalarSolve(), PPCG::scalarSolveCG(), GAMGSolver::solve(), PBiCG::solve(), and smoothSolver::solve().

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 392 of file lduMatrix.H.

References normFactor(), normType_, and psi.

Here is the call graph for this function:

Member Data Documentation

◆ fieldName_

◆ matrix_

◆ interfaceBouCoeffs_

◆ interfaceIntCoeffs_

const FieldField<Field, scalar>& interfaceIntCoeffs_
protected

Definition at line 160 of file lduMatrix.H.

Referenced by interfaceIntCoeffs(), PBiCG::solve(), smoothSolver::solve(), and solver().

◆ interfaces_

◆ controlDict_

◆ log_

int log_
protected

◆ minIter_

label minIter_
protected

◆ maxIter_

label maxIter_
protected

◆ normType_

lduMatrix::normTypes normType_
protected

The normalisation type.

Definition at line 186 of file lduMatrix.H.

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

◆ tolerance_

◆ relTol_

scalar relTol_
protected

◆ profiling_

profilingTrigger profiling_
protected

Profiling instrumentation.

Definition at line 201 of file lduMatrix.H.

Referenced by solver().


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