Class NewtonSolverIterative
Defined in File newton_solver.h
Inheritance Relationships
Base Type
public amici::NewtonSolver
(Class NewtonSolver)
Class Documentation
-
class amici::NewtonSolverIterative : public amici::NewtonSolver
The NewtonSolverIterative provides access to the iterative linear solver for the Newton method.
Public Functions
-
NewtonSolverIterative(realtype *t, AmiVector *x, Model *model)
Constructor, initializes all members with the provided objects.
- Parameters
t – pointer to time variable
x – pointer to state variables
model – pointer to the model object
-
~NewtonSolverIterative() override = default
-
virtual void solveLinearSystem(AmiVector &rhs) override
Solves the linear system for the Newton step by passing it to linsolveSPBCG.
- Parameters
rhs – containing the RHS of the linear system, will be overwritten by solution to the linear system
-
virtual void prepareLinearSystem(int ntry, int nnewt) override
Writes the Jacobian (J) for the Newton iteration and passes it to the linear solver. Also wraps around getSensis for iterative linear solver.
- Parameters
ntry – integer newton_try integer start number of Newton solver (1 or 2)
nnewt – integer number of current Newton step
-
virtual void prepareLinearSystemB(int ntry, int nnewt) override
Writes the Jacobian (JB) for the Newton iteration and passes it to the linear solver. Also wraps around getSensis for iterative linear solver.
- Parameters
ntry – integer newton_try integer start number of Newton solver (1 or 2)
nnewt – integer number of current Newton step
-
void linsolveSPBCG(int ntry, int nnewt, AmiVector &ns_delta)
Iterative linear solver created from SPILS BiCG-Stab. Solves the linear system within each Newton step if iterative solver is chosen.
- Parameters
ntry – integer newton_try integer start number of Newton solver (1 or 2)
nnewt – integer number of current Newton step
ns_delta – Newton step
-
NewtonSolverIterative(realtype *t, AmiVector *x, Model *model)