Project Chrono: chrono::ChSolverAPGD Class Reference

Public Member Functions | List of all members
chrono::ChSolverAPGD Class Reference
Chrono::Engine » Solver

## Description

An iterative solver based on Nesterov's Projected Gradient Descent.

See ChSystemDescriptor for more information about the problem formulation and the data structures passed to the solver.

`#include <ChSolverAPGD.h>`

Inheritance diagram for chrono::ChSolverAPGD:
[legend]
Collaboration diagram for chrono::ChSolverAPGD:
[legend]

## Public Member Functions
virtual Type | GetType () const override
| Return type of the solver.
virtual double | Solve (ChSystemDescriptor &sysd) override
| Performs the solution of the problem.
virtual double | GetError () const override
| Return the tolerance error reached during the last solve.
void | Dump_Rhs (std::vector< double > &temp)
void | Dump_Lambda (std::vector< double > &temp)
Public Member Functions inherited from chrono::ChIterativeSolverVI
void | SetOmega (double mval)
| Set the overrelaxation factor (default: 1.0).
void | SetSharpnessLambda (double mval)
| Set the sharpness factor (default: 1.0).
virtual void | SetMaxIterations (int max_iterations) override
| Set the maximum number of iterations.
void | SetRecordViolation (bool mval)
| Enable/disable recording of the constraint violation history.
double | GetOmega () const
| Return the current value of the overrelaxation factor.
double | GetSharpnessLambda () const
| Return the current value of the sharpness factor.
virtual int | GetIterations () const override
| Return the number of iterations performed during the last solve.
const std::vector< double > & | GetViolationHistory () const
| Access the vector of constraint violation history.
const std::vector< double > & | GetDeltalambdaHistory () const
| Access the vector with history of maximum change in Lagrange multipliers Note that collection of constraint violations must be enabled through SetRecordViolation.
virtual void | ArchiveOut (ChArchiveOut &archive_out) override
| Method to allow serialization of transient data to archives.
virtual void | ArchiveIn (ChArchiveIn &archive_in) override
| Method to allow de-serialization of transient data from archives.
Public Member Functions inherited from chrono::ChIterativeSolver
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.
Public Member Functions inherited from chrono::ChSolver
virtual ChDirectSolverLS * | AsDirect ()
| Downcast to ChDirectSolver.
virtual bool | Setup (ChSystemDescriptor &sysd)
| This function does the setup operations for the solver.
void | SetVerbose (bool mv)
| Set verbose output from solver.
void | EnableWrite (bool val, const std::string &frame, const std::string &out_dir=".")
| Enable/disable debug output of matrix, RHS, and solution vector.

## Additional Inherited Members
Public Types inherited from chrono::ChSolver
enum class | Type { PSOR , PSSOR , PJACOBI , PMINRES , BARZILAIBORWEIN , APGD , ADMM , SPARSE_LU , SPARSE_QR , PARDISO_MKL , MUMPS , GMRES , MINRES , BICGSTAB , CUSTOM }
| Available types of solvers. More...
Protected Member Functions inherited from chrono::ChIterativeSolverVI
virtual bool | IsIterative () const override
| Return true if iterative solver.
virtual bool | IsDirect () const override
| Return true if direct solver.
virtual ChIterativeSolver * | AsIterative () override
| Downcast to ChIterativeSolver.
void | AtIterationEnd (double mmaxviolation, double mdeltalambda, unsigned int iternum)
| This method MUST be called by all iterative methods INSIDE their iteration loops (at the end).
virtual bool | SolveRequiresMatrix () const override
| Indicate whether ot not the Solve() phase requires an up-to-date problem matrix.
Protected Member Functions inherited from chrono::ChIterativeSolver
| 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)
Protected Attributes inherited from chrono::ChIterativeSolverVI
int | m_iterations
| number of iterations performed by the solver during last call to Solve()
double | m_omega
| over-relaxation factor
double | m_shlambda
| sharpness factor
bool | record_violation_history
std::vector< double > | violation_history
std::vector< double > | dlambda_history
Protected Attributes inherited from chrono::ChIterativeSolver
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
Protected Attributes inherited from chrono::ChSolver
bool | verbose
bool | write_matrix
std::string | output_dir
std::string | frame_id

## Member Function Documentation

## ◆ GetError()

virtual double chrono::ChSolverAPGD::GetError | ( |  | ) | const
| inlineoverridevirtual

Return the tolerance error reached during the last solve.

For the APGD solver, this is the norm of the projected gradient.

Implements chrono::ChIterativeSolver.

## ◆ GetType()

virtual Type chrono::ChSolverAPGD::GetType | ( |  | ) | const
| inlineoverridevirtual

Return type of the solver.

Reimplemented from chrono::ChSolver.

## ◆ Solve()

double chrono::ChSolverAPGD::Solve | ( | ChSystemDescriptor & | sysd | ) |
| overridevirtual

Performs the solution of the problem.

Implements chrono::ChSolver.

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

- D:/W/B/src/chrono-9.0.1/src/chrono/solver/ChSolverAPGD.h
- D:/W/B/src/chrono-9.0.1/src/chrono/solver/ChSolverAPGD.cpp