Project Chrono: chrono::fsi::ChFsiLinearSolver Class Reference

Public Member Functions | Protected Attributes | List of all members
chrono::fsi::ChFsiLinearSolver Class Referenceabstract
FSI module » Linear solvers

## Description

Base class for solving linear systems on GPUs.

Specific solution methods are implemented in derived classes.

`#include <ChFsiLinearSolver.h>`

Inheritance diagram for chrono::fsi::ChFsiLinearSolver:
[legend]

## Public Member Functions
| ChFsiLinearSolver (SolverType msolver, Real mrel_res=1e-8, Real mabs_res=1e-4, int mmax_iter=1000, bool mverbose=false)
| Constructor of the ChFsiLinearSolver class.
virtual | ~ChFsiLinearSolver ()
| Destructor of the ChFsiLinearSolver class.
SolverType | GetType ()
| Return the solver type.
void | SetVerbose (bool mv)
| Set verbose output from solver.
bool | GetVerbose () const
| Return whether or not verbose output is enabled.
Real | GetResidual ()
| Return the current residual.
unsigned int | GetNumIterations ()
| Return the number of current Iterations.
void | SetIterationLimit (int numIter)
| Set the maximum number of iterations.
int | GetIterationLimit ()
| Set the maximum number of iterations.
void | SetAbsRes (Real mabs_res)
| Set the absolute residual.
Real | GetAbsRes ()
| Get the absolute residual.
void | SetRelRes (Real mrel_res)
| Get the relative residual.
Real | GetRelRes ()
| Get the relative residual.
int | GetSolverStatus ()
| Return the solver status.
virtual void | Solve (int SIZE, int NNZ, Real *A, unsigned int *ArowIdx, unsigned int *AcolIdx, Real *x, Real *b)=0
| Solve linear system for x.

## Protected Attributes
Real | rel_res = Real(1e-3)
Real | abs_res = Real(1e-6)
Real | residual = Real(1e5)
int | max_iter = 500
bool | verbose = false
int | Iterations = 0
int | solver_status = 0

## Member Function Documentation

## ◆ GetSolverStatus()

int chrono::fsi::ChFsiLinearSolver::GetSolverStatus | ( |  | ) |
| inline

Return the solver status.

- 0: unsuccessful
- 1: successfully converged

## ◆ Solve()

virtual void chrono::fsi::ChFsiLinearSolver::Solve | ( | int | SIZE,
|  | int | NNZ,
|  | Real * | A,
|  | unsigned int * | ArowIdx,
|  | unsigned int * | AcolIdx,
|  | Real * | x,
|  | Real * | b )
| pure virtual

Solve linear system for x.

Implemented in chrono::fsi::ChFsiLinearSolverBiCGStab, and chrono::fsi::ChFsiLinearSolverGMRES.

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

- D:/W/B/src/chrono-9.0.1/src/chrono_fsi/math/ChFsiLinearSolver.h