Preconditioned pipelined conjugate gradient solver for symmetric lduMatrices using a run-time selectable preconditioner. More...
Public Member Functions | |
TypeName ("PPCG") | |
Runtime type information. More... | |
PPCG (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. More... | |
virtual | ~PPCG ()=default |
Destructor. More... | |
virtual solverPerformance | solve (scalarField &psi, const scalarField &source, const direction cmpt=0) const |
Solve the matrix with this solver. More... | |
Public Member Functions inherited from lduMatrix::solver | |
virtual const word & | type () 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 word & | fieldName () const noexcept |
const lduMatrix & | matrix () const noexcept |
const FieldField< Field, scalar > & | interfaceBouCoeffs () const noexcept |
const FieldField< Field, scalar > & | interfaceIntCoeffs () const noexcept |
const lduInterfaceFieldPtrsList & | interfaces () const noexcept |
virtual void | read (const dictionary &) |
Read and reset the solver parameters from the given stream. 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... | |
Protected Member Functions | |
solverPerformance | scalarSolveCG (solveScalarField &psi, const solveScalarField &source, const direction cmpt, const bool cgMode) const |
CG solver. Operates either in conjugate-gradient mode or conjugate residual. More... | |
Protected Member Functions inherited from lduMatrix::solver | |
virtual void | readControls () |
Read the control parameters from controlDict_. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from lduMatrix::solver | |
static autoPtr< solver > | New (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 Attributes inherited from lduMatrix::solver | |
word | fieldName_ |
const lduMatrix & | matrix_ |
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... | |
Preconditioned pipelined conjugate gradient solver for symmetric lduMatrices using a run-time selectable preconditioner.
P. Ghysels, W. Vanroose. "Hiding global synchronization latency in the preconditioned Conjugate Gradient algorithm"
and implementation details from
Paul Eller, William Gropp "Scalable Non-blocking Preconditioned Conjugate Gradient Methods"
PPCG | ( | const word & | fieldName, |
const lduMatrix & | matrix, | ||
const FieldField< Field, scalar > & | interfaceBouCoeffs, | ||
const FieldField< Field, scalar > & | interfaceIntCoeffs, | ||
const lduInterfaceFieldPtrsList & | interfaces, | ||
const dictionary & | solverControls | ||
) |
|
virtualdefault |
Destructor.
|
protected |
CG solver. Operates either in conjugate-gradient mode or conjugate residual.
Definition at line 75 of file PPCG.C.
References Foam::constant::atomic::alpha, beta(), SolverPerformance< Type >::checkConvergence(), Foam::ensightOutput::debug, delta, Foam::endl(), SolverPerformance< Type >::finalResidual(), gamma, lduMatrix::preconditioner::getName(), Foam::Info, SolverPerformance< Type >::initialResidual(), n, lduMatrix::preconditioner::New(), SolverPerformance< Type >::nIterations(), p, lduMatrix::preconditioner::precondition(), psi, s, UList< T >::size(), Foam::type(), and UPstream::waitRequest().
TypeName | ( | "PPCG" | ) |
Runtime type information.
|
virtual |
Solve the matrix with this solver.
Implements lduMatrix::solver.
Reimplemented in PPCR.
Definition at line 282 of file PPCG.C.
References refPtr< Container< Type > >::ref().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.