Class SUNLinSolSPBCGS

Inheritance Relationships

Base Type

Class Documentation

class amici::SUNLinSolSPBCGS : public amici::SUNLinSolWrapper

SUNDIALS scaled preconditioned Bi-CGStab (Bi-Conjugate Gradient Stable method) (SPBCGS) solver.

Public Functions

SUNLinSolSPBCGS(N_Vector x, int pretype = PREC_NONE, int maxl = SUNSPBCGS_MAXL_DEFAULT)

SUNLinSolSPBCGS.

Parameters
  • x: A template for cloning vectors needed within the solver.

  • pretype: Preconditioner type (PREC_NONE, PREC_LEFT, PREC_RIGHT, PREC_BOTH)

  • maxl: Maximum number of solver iterations

SUNLinSolSPBCGS(AmiVector const &x, int pretype = PREC_NONE, int maxl = SUNSPBCGS_MAXL_DEFAULT)

SUNLinSolSPBCGS.

Parameters
  • x: A template for cloning vectors needed within the solver.

  • pretype: Preconditioner type (PREC_NONE, PREC_LEFT, PREC_RIGHT, PREC_BOTH)

  • maxl: Maximum number of solver iterations

int setATimes(void *A_data, ATimesFn ATimes)

Sets the function pointer for ATimes (see sundials/sundials_linearsolver.h).

Return

Parameters
  • A_data:

  • ATimes:

int setPreconditioner(void *P_data, PSetupFn Pset, PSolveFn Psol)

Sets function pointers for PSetup and PSolve routines inside of iterative linear solver objects (see sundials/sundials_linearsolver.h).

Return

Parameters
  • P_data:

  • Pset:

  • Psol:

int setScalingVectors(N_Vector s, N_Vector nul)

Sets pointers to left/right scaling vectors for the linear system solve (see sundials/sundials_linearsolver.h).

Return

Parameters
  • s:

  • nul:

int getNumIters() const

Returns the number of linear iterations performed in the last ‘Solve’ call.

Return

Number of iterations

realtype getResNorm() const

Returns the final residual norm from the last ‘Solve’ call.

Return

residual norm

N_Vector getResid() const

Get preconditioned initial residual (see sundials/sundials_linearsolver.h).

Return