Jet  v1.3.3
Public Member Functions | Static Public Member Functions | List of all members
jet::FdmGaussSeidelSolver2 Class Referencefinal

2-D finite difference-type linear system solver using Gauss-Seidel method. More...

#include <jet/fdm_gauss_seidel_solver2.h>

Inheritance diagram for jet::FdmGaussSeidelSolver2:
jet::FdmLinearSystemSolver2

Public Member Functions

 FdmGaussSeidelSolver2 (unsigned int maxNumberOfIterations, unsigned int residualCheckInterval, double tolerance, double sorFactor=1.0, bool useRedBlackOrdering=false)
 Constructs the solver with given parameters. More...
 
bool solve (FdmLinearSystem2 *system) override
 Solves the given linear system. More...
 
bool solveCompressed (FdmCompressedLinearSystem2 *system) override
 Solves the given compressed linear system. More...
 
unsigned int maxNumberOfIterations () const
 Returns the max number of Gauss-Seidel iterations. More...
 
unsigned int lastNumberOfIterations () const
 Returns the last number of Gauss-Seidel iterations the solver made. More...
 
double tolerance () const
 Returns the max residual tolerance for the Gauss-Seidel method. More...
 
double lastResidual () const
 Returns the last residual after the Gauss-Seidel iterations. More...
 
double sorFactor () const
 Returns the SOR (Successive Over Relaxation) factor. More...
 
bool useRedBlackOrdering () const
 Returns true if red-black ordering is enabled. More...
 
- Public Member Functions inherited from jet::FdmLinearSystemSolver2
 FdmLinearSystemSolver2 ()=default
 
virtual ~FdmLinearSystemSolver2 ()=default
 

Static Public Member Functions

static void relax (const FdmMatrix2 &A, const FdmVector2 &b, double sorFactor, FdmVector2 *x)
 Performs single natural Gauss-Seidel relaxation step. More...
 
static void relax (const MatrixCsrD &A, const VectorND &b, double sorFactor, VectorND *x)
 Performs single natural Gauss-Seidel relaxation step for compressed sys. More...
 
static void relaxRedBlack (const FdmMatrix2 &A, const FdmVector2 &b, double sorFactor, FdmVector2 *x)
 Performs single Red-Black Gauss-Seidel relaxation step. More...
 

Detailed Description

2-D finite difference-type linear system solver using Gauss-Seidel method.

Constructor & Destructor Documentation

◆ FdmGaussSeidelSolver2()

jet::FdmGaussSeidelSolver2::FdmGaussSeidelSolver2 ( unsigned int  maxNumberOfIterations,
unsigned int  residualCheckInterval,
double  tolerance,
double  sorFactor = 1.0,
bool  useRedBlackOrdering = false 
)

Constructs the solver with given parameters.

Member Function Documentation

◆ lastNumberOfIterations()

unsigned int jet::FdmGaussSeidelSolver2::lastNumberOfIterations ( ) const

Returns the last number of Gauss-Seidel iterations the solver made.

◆ lastResidual()

double jet::FdmGaussSeidelSolver2::lastResidual ( ) const

Returns the last residual after the Gauss-Seidel iterations.

◆ maxNumberOfIterations()

unsigned int jet::FdmGaussSeidelSolver2::maxNumberOfIterations ( ) const

Returns the max number of Gauss-Seidel iterations.

◆ relax() [1/2]

static void jet::FdmGaussSeidelSolver2::relax ( const FdmMatrix2 A,
const FdmVector2 b,
double  sorFactor,
FdmVector2 x 
)
static

Performs single natural Gauss-Seidel relaxation step.

◆ relax() [2/2]

static void jet::FdmGaussSeidelSolver2::relax ( const MatrixCsrD A,
const VectorND b,
double  sorFactor,
VectorND x 
)
static

Performs single natural Gauss-Seidel relaxation step for compressed sys.

◆ relaxRedBlack()

static void jet::FdmGaussSeidelSolver2::relaxRedBlack ( const FdmMatrix2 A,
const FdmVector2 b,
double  sorFactor,
FdmVector2 x 
)
static

Performs single Red-Black Gauss-Seidel relaxation step.

◆ solve()

bool jet::FdmGaussSeidelSolver2::solve ( FdmLinearSystem2 system)
overridevirtual

Solves the given linear system.

Implements jet::FdmLinearSystemSolver2.

◆ solveCompressed()

bool jet::FdmGaussSeidelSolver2::solveCompressed ( FdmCompressedLinearSystem2 system)
overridevirtual

Solves the given compressed linear system.

Reimplemented from jet::FdmLinearSystemSolver2.

◆ sorFactor()

double jet::FdmGaussSeidelSolver2::sorFactor ( ) const

Returns the SOR (Successive Over Relaxation) factor.

◆ tolerance()

double jet::FdmGaussSeidelSolver2::tolerance ( ) const

Returns the max residual tolerance for the Gauss-Seidel method.

◆ useRedBlackOrdering()

bool jet::FdmGaussSeidelSolver2::useRedBlackOrdering ( ) const

Returns true if red-black ordering is enabled.


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