Reaktoro
A unified framework for modeling chemically reactive systems
KktSolver Class Reference

A type to describe a solver for a KKT equation. More...

#include <KktSolver.hpp>

Public Member Functions

 KktSolver ()
 Construct a default KktSolver instance.
 
 KktSolver (const KktSolver &other)
 Construct a copy of a KktSolver instance.
 
virtual ~KktSolver ()
 Destroy this KktSolver instance.
 
auto operator= (KktSolver other) -> KktSolver &
 Assign a KktSolver instance to this.
 
auto result () const -> const KktResult &
 Return the result of the last calculation.
 
auto setOptions (const KktOptions &options) -> void
 Set the options for the KKT calculations.
 
auto decompose (const KktMatrix &lhs) -> void
 Decompose the KKT matrix before solving it.
 
auto solve (const KktVector &rhs, KktSolution &sol) -> void
 Solve the KKT equation using an appropriate and efficient approach according to a priori decomposition call. More...
 

Detailed Description

A type to describe a solver for a KKT equation.

Member Function Documentation

◆ solve()

auto solve ( const KktVector rhs,
KktSolution sol 
) -> void

Solve the KKT equation using an appropriate and efficient approach according to a priori decomposition call.

The KKT equation is solved using an LU decomposition if the matrices H and A are dense. A rangespace approach is used instead if either the inverse of the H matrix is known or it has a diagonal structure. Finally, if the matrix A has been specified to be constant, then an efficient nullspace approach is used to reduce the system of linear equations.

Parameters
rhsThe right-hand side vector of the KKT equation
solThe solution vector of the KKT equation

The documentation for this class was generated from the following files:
  • Reaktoro/Optimization/KktSolver.hpp
  • Reaktoro/Optimization/KktSolver.cpp