Class NewtonSolverSparse

Inheritance Relationships

Base Type

Class Documentation

class NewtonSolverSparse : public amici::NewtonSolver

The NewtonSolverSparse provides access to the sparse linear solver for the Newton method.

Public Functions

explicit NewtonSolverSparse(Model const &model)

constructor for dense solver

Parameters:

model – model instance that provides problem dimensions

NewtonSolverSparse(NewtonSolverSparse const&) = delete
NewtonSolverSparse &operator=(NewtonSolverSparse const &other) = delete
~NewtonSolverSparse() override
virtual void solveLinearSystem(AmiVector &rhs) override

Solves the linear system for the Newton step.

Parameters:

rhs – containing the RHS of the linear system, will be overwritten by solution to the linear system

virtual void prepareLinearSystem(Model &model, SimulationState const &state) override

Writes the Jacobian for the Newton iteration and passes it to the linear solver.

Parameters:
  • model – pointer to the model instance

  • state – current simulation state

virtual void prepareLinearSystemB(Model &model, SimulationState const &state) override

Writes the Jacobian (JB) for the Newton iteration and passes it to the linear solver

Parameters:
  • model – pointer to the model instance

  • state – current simulation state

virtual bool is_singular(Model &model, SimulationState const &state) const override

Checks whether linear system is singular.

Parameters:
  • model – pointer to the model instance

  • state – current simulation state

Returns:

boolean indicating whether the linear system is singular (condition number < 1/machine precision)

virtual void reinitialize() override

Reinitialize the linear solver.