Description

Base class for iterative solvers.

Provides basic settings, common to both linear and complementarity iterative solvers.

#include <ChIterativeSolver.h>

Inheritance diagram for chrono::ChIterativeSolver:

Public Member Functions

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). More...
 
void EnableWarmStart (bool val)
 Enable/disable warm starting by providing an initial guess (default: false). More...
 
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 SaveMatrix (ChSystemDescriptor &sysd)
 
double CheckSolution (ChSystemDescriptor &sysd, const ChVectorDynamic<> &x)
 

Protected Attributes

bool m_use_precond
 use diagonal preconditioning?
 
bool m_warm_start
 use initial guesss?
 
int m_max_iterations
 maximum number of iterations
 
double m_tolerance
 tolerance threshold in stopping criteria
 

Friends

class ChSystem
 

Member Function Documentation

◆ EnableDiagonalPreconditioner()

void chrono::ChIterativeSolver::EnableDiagonalPreconditioner ( bool  val)
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()

void chrono::ChIterativeSolver::EnableWarmStart ( bool  val)
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!


The documentation for this class was generated from the following files:
  • /builds/uwsbel/chrono/src/chrono/solver/ChIterativeSolver.h
  • /builds/uwsbel/chrono/src/chrono/solver/ChIterativeSolver.cpp