Go to the documentation of this file.
7 #ifndef INCLUDE_JET_FDM_GAUSS_SEIDEL_SOLVER3_H_
8 #define INCLUDE_JET_FDM_GAUSS_SEIDEL_SOLVER3_H_
20 unsigned int residualCheckInterval,
double tolerance,
62 unsigned int _maxNumberOfIterations;
63 unsigned int _lastNumberOfIterations;
64 unsigned int _residualCheckInterval;
68 bool _useRedBlackOrdering;
76 void clearUncompressedVectors();
77 void clearCompressedVectors();
85 #endif // INCLUDE_JET_FDM_GAUSS_SEIDEL_SOLVER3_H_
double sorFactor() const
Returns the SOR (Successive Over Relaxation) factor.
std::shared_ptr< FdmGaussSeidelSolver3 > FdmGaussSeidelSolver3Ptr
Shared pointer type for the FdmGaussSeidelSolver3.
Definition: fdm_gauss_seidel_solver3.h:81
double lastResidual() const
Returns the last residual after the Gauss-Seidel iterations.
FdmGaussSeidelSolver3(unsigned int maxNumberOfIterations, unsigned int residualCheckInterval, double tolerance, double sorFactor=1.0, bool useRedBlackOrdering=false)
Constructs the solver with given parameters.
bool solve(FdmLinearSystem3 *system) override
Solves the given linear system.
double tolerance() const
Returns the max residual tolerance for the Gauss-Seidel method.
static void relaxRedBlack(const FdmMatrix3 &A, const FdmVector3 &b, double sorFactor, FdmVector3 *x)
Performs single Red-Black Gauss-Seidel relaxation step.
Definition: advection_solver2.h:18
bool useRedBlackOrdering() const
Returns true if red-black ordering is enabled.
bool solveCompressed(FdmCompressedLinearSystem3 *system) override
Solves the given compressed linear system.
Abstract base class for 3-D finite difference-type linear system solver.
Definition: fdm_linear_system_solver3.h:17
unsigned int maxNumberOfIterations() const
Returns the max number of Gauss-Seidel iterations.
Compressed linear system (Ax=b) for 3-D finite differencing.
Definition: fdm_linear_system3.h:57
static void relax(const FdmMatrix3 &A, const FdmVector3 &b, double sorFactor, FdmVector3 *x)
Performs single natural Gauss-Seidel relaxation step.
Linear system (Ax=b) for 3-D finite differencing.
Definition: fdm_linear_system3.h:39
unsigned int lastNumberOfIterations() const
Returns the last number of Gauss-Seidel iterations the solver made.
3-D finite difference-type linear system solver using Gauss-Seidel method.
Definition: fdm_gauss_seidel_solver3.h:16
static void relax(const MatrixCsrD &A, const VectorND &b, double sorFactor, VectorND *x)
Performs single natural Gauss-Seidel relaxation step for compressed sys.
3-D array class.
Definition: array3.h:43