Class NewtonSolverSparse
Defined in File newton_solver.h
Inheritance Relationships
Base Type
public amici::NewtonSolver
(Class NewtonSolver)
Class Documentation
-
class amici::NewtonSolverSparse : public amici::NewtonSolver
The NewtonSolverSparse provides access to the sparse linear solver for the Newton method.
Public Functions
-
explicit NewtonSolverSparse(const Model &model)
constructor for dense solver
- Parameters
model – model instance that provides problem dimensions
-
NewtonSolverSparse(const NewtonSolverSparse&) = delete
-
NewtonSolverSparse &operator=(const NewtonSolverSparse &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, const SimulationState &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, const SimulationState &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, const SimulationState &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.
-
explicit NewtonSolverSparse(const Model &model)