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 5c1a647092
commit b3e5224753
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
descent optimisation.
- 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
GAMGSolver.C
@ -300,9 +300,9 @@ class GAMGSolver
const scalar relTol
) 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
dictionary PBiCGsolverDict
dictionary PBiCGStabSolverDict
(
const scalar tol,
const scalar relTol

View File

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