mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
GAMGSolverSolve: Replace PBiCG with PBiCGStab to solve the coarsest-level of asymmetric matrices
This commit is contained in:
@ -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
|
||||
|
||||
@ -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,
|
||||
|
||||
Reference in New Issue
Block a user