GAMGSolverSolve: Replace PBiCG with PBiCGStab to solve the coarsest-level of asymmetric matrices

This commit is contained in:
Henry Weller 2016-09-10 16:44:01 +01:00
parent 3033d4677b
commit a7210ecb1a
2 changed files with 10 additions and 10 deletions

View file

@ -39,7 +39,7 @@ Description
- Coarse matrix scaling: performed by correction scaling, using steepest - Coarse matrix scaling: performed by correction scaling, using steepest
descent optimisation. descent optimisation.
- Type of cycle: V-cycle with optional pre-smoothing. - Type of cycle: V-cycle with optional pre-smoothing.
- Coarsest-level matrix solved using PCG or PBiCG. - Coarsest-level matrix solved using PCG or PBiCGStab.
SourceFiles SourceFiles
GAMGSolver.C GAMGSolver.C
@ -300,9 +300,9 @@ class GAMGSolver
const scalar relTol const scalar relTol
) const; ) const;
//- Create and return the dictionary to specify the PBiCG solver //- Create and return the dictionary to specify the PBiCGStab solver
// to solve the coarsest level // to solve the coarsest level
dictionary PBiCGsolverDict dictionary PBiCGStabSolverDict
( (
const scalar tol, const scalar tol,
const scalar relTol const scalar relTol

View file

@ -25,7 +25,7 @@ License
#include "GAMGSolver.H" #include "GAMGSolver.H"
#include "PCG.H" #include "PCG.H"
#include "PBiCG.H" #include "PBiCGStab.H"
#include "SubField.H" #include "SubField.H"
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
@ -533,13 +533,13 @@ Foam::dictionary Foam::GAMGSolver::PCGsolverDict
} }
Foam::dictionary Foam::GAMGSolver::PBiCGsolverDict Foam::dictionary Foam::GAMGSolver::PBiCGStabSolverDict
( (
const scalar tol, const scalar tol,
const scalar relTol const scalar relTol
) const ) const
{ {
dictionary dict(IStringStream("solver PBiCG; preconditioner DILU;")()); dictionary dict(IStringStream("solver PBiCGStab; preconditioner DILU;")());
dict.add("tolerance", tol); dict.add("tolerance", tol);
dict.add("relTol", relTol); dict.add("relTol", relTol);
@ -612,14 +612,14 @@ void Foam::GAMGSolver::solveCoarsestLevel
// //
// if (allMatrix.asymmetric()) // if (allMatrix.asymmetric())
// { // {
// coarseSolverPerf = PBiCG // coarseSolverPerf = PBiCGStab
// ( // (
// "coarsestLevelCorr", // "coarsestLevelCorr",
// allMatrix, // allMatrix,
// procInterfaceLevelsBouCoeffs_[coarsestLevel], // procInterfaceLevelsBouCoeffs_[coarsestLevel],
// procInterfaceLevelsIntCoeffs_[coarsestLevel], // procInterfaceLevelsIntCoeffs_[coarsestLevel],
// procInterfaceLevels_[coarsestLevel], // procInterfaceLevels_[coarsestLevel],
// PBiCGsolverDict(tolerance_, relTol_) // PBiCGStabSolverDict(tolerance_, relTol_)
// ).solve // ).solve
// ( // (
// coarsestCorrField, // coarsestCorrField,
@ -673,14 +673,14 @@ void Foam::GAMGSolver::solveCoarsestLevel
if (matrixLevels_[coarsestLevel].asymmetric()) if (matrixLevels_[coarsestLevel].asymmetric())
{ {
coarseSolverPerf = PBiCG coarseSolverPerf = PBiCGStab
( (
"coarsestLevelCorr", "coarsestLevelCorr",
matrixLevels_[coarsestLevel], matrixLevels_[coarsestLevel],
interfaceLevelsBouCoeffs_[coarsestLevel], interfaceLevelsBouCoeffs_[coarsestLevel],
interfaceLevelsIntCoeffs_[coarsestLevel], interfaceLevelsIntCoeffs_[coarsestLevel],
interfaceLevels_[coarsestLevel], interfaceLevels_[coarsestLevel],
PBiCGsolverDict(tolerance_, relTol_) PBiCGStabSolverDict(tolerance_, relTol_)
).solve ).solve
( (
coarsestCorrField, coarsestCorrField,