Description
Base class for iterative solvers.
Provides basic settings, common to both linear and complementarity iterative solvers.
#include <ChIterativeSolver.h>

Public Member Functions | |
virtual void | SetMaxIterations (int max_iterations) |
Set the maximum number of iterations. | |
void | SetTolerance (double tolerance) |
Set the tolerance threshold used by the stopping criteria. | |
void | EnableDiagonalPreconditioner (bool val) |
Enable/disable use of a simple diagonal preconditioner (default: true). | |
void | EnableWarmStart (bool val) |
Enable/disable warm starting by providing an initial guess (default: false). | |
int | GetMaxIterations () const |
Get the current maximum number of iterations. | |
double | GetTolerance () const |
Get the current tolerance value. | |
virtual int | GetIterations () const =0 |
Return the number of iterations performed during the last solve. | |
virtual double | GetError () const =0 |
Return the tolerance error reached during the last solve. | |
Protected Member Functions | |
ChIterativeSolver (int max_iterations, double tolerance, bool use_precond, bool warm_start) | |
void | WriteMatrices (ChSystemDescriptor &sysd, bool one_indexed=true) |
double | CheckSolution (ChSystemDescriptor &sysd, const ChVectorDynamic<> &x) |
Friends | |
class | ChSystem |
Member Function Documentation
◆ EnableDiagonalPreconditioner()
|
inline |
Enable/disable use of a simple diagonal preconditioner (default: true).
If enabled, solver that support this feature will use the diagonal of the system matrix for preconditioning.
◆ EnableWarmStart()
|
inline |
Enable/disable warm starting by providing an initial guess (default: false).
If enabled, the solvers use as an initial guess the current values for [x; -lambda].
ATTENTION: enable this option only if using the Euler implicit linearized integrator!
◆ GetError()
|
pure virtual |
Return the tolerance error reached during the last solve.
Implemented in chrono::ChIterativeSolverMulticore, chrono::ChSolverADMM, chrono::ChSolverAPGD, chrono::ChSolverBB, chrono::ChSolverBiCGSTAB, chrono::ChSolverGMRES, chrono::ChSolverMINRES, chrono::ChSolverPJacobi, chrono::ChSolverPMINRES, chrono::ChSolverPSOR, and chrono::ChSolverPSSOR.
◆ GetIterations()
|
pure virtual |
Return the number of iterations performed during the last solve.
Implemented in chrono::ChIterativeSolverVI, chrono::ChSolverBiCGSTAB, chrono::ChSolverGMRES, and chrono::ChSolverMINRES.
◆ SetMaxIterations()
|
inlinevirtual |
Set the maximum number of iterations.
Reimplemented in chrono::ChIterativeSolverVI.
The documentation for this class was generated from the following files:
- C:/M/B/src/chrono-9.0.1/src/chrono/solver/ChIterativeSolver.h
- C:/M/B/src/chrono-9.0.1/src/chrono/solver/ChIterativeSolver.cpp