#include <IpAugSystemSolver.hpp>
This is the base class for linear solvers that solve the augmented system, which is defined as
Since this system might be solved repeatedly for different right hand sides, it is desirable to step the factorization of a direct linear solver if possible.
Public Member Functions | |
virtual bool | InitializeImpl (const OptionsList &options, const std::string &prefix)=0 |
overloaded from AlgorithmStrategyObject | |
virtual ESymSolverStatus | Solve (const SymMatrix *W, double W_factor, const Vector *D_x, double delta_x, const Vector *D_s, double delta_s, const Matrix *J_c, const Vector *D_c, double delta_c, const Matrix *J_d, const Vector *D_d, double delta_d, const Vector &rhs_x, const Vector &rhs_s, const Vector &rhs_c, const Vector &rhs_d, Vector &sol_x, Vector &sol_s, Vector &sol_c, Vector &sol_d, bool check_NegEVals, Index numberOfNegEVals) |
Set up the augmented system and solve it for a given right hand side. | |
virtual ESymSolverStatus | MultiSolve (const SymMatrix *W, double W_factor, const Vector *D_x, double delta_x, const Vector *D_s, double delta_s, const Matrix *J_c, const Vector *D_c, double delta_c, const Matrix *J_d, const Vector *D_d, double delta_d, std::vector< SmartPtr< const Vector > > &rhs_xV, std::vector< SmartPtr< const Vector > > &rhs_sV, std::vector< SmartPtr< const Vector > > &rhs_cV, std::vector< SmartPtr< const Vector > > &rhs_dV, std::vector< SmartPtr< Vector > > &sol_xV, std::vector< SmartPtr< Vector > > &sol_sV, std::vector< SmartPtr< Vector > > &sol_cV, std::vector< SmartPtr< Vector > > &sol_dV, bool check_NegEVals, Index numberOfNegEVals) |
Like Solve, but for multiple right hand sides. | |
virtual Index | NumberOfNegEVals () const =0 |
Number of negative eigenvalues detected during last solve. | |
virtual bool | ProvidesInertia () const =0 |
Query whether inertia is computed by linear solver. | |
virtual bool | IncreaseQuality ()=0 |
Request to increase quality of solution for next solve. | |
Constructors/Destructors | |
AugSystemSolver () | |
Default constructor. | |
virtual | ~AugSystemSolver () |
Default destructor. |
AugSystemSolver | ( | ) | [inline] |
Default constructor.
virtual ~AugSystemSolver | ( | ) | [inline, virtual] |
Default destructor.
virtual bool InitializeImpl | ( | const OptionsList & | options, | |
const std::string & | prefix | |||
) | [pure virtual] |
overloaded from AlgorithmStrategyObject
Implements AlgorithmStrategyObject.
Implemented in AugRestoSystemSolver, LowRankAugSystemSolver, and StdAugSystemSolver.
virtual ESymSolverStatus Solve | ( | const SymMatrix * | W, | |
double | W_factor, | |||
const Vector * | D_x, | |||
double | delta_x, | |||
const Vector * | D_s, | |||
double | delta_s, | |||
const Matrix * | J_c, | |||
const Vector * | D_c, | |||
double | delta_c, | |||
const Matrix * | J_d, | |||
const Vector * | D_d, | |||
double | delta_d, | |||
const Vector & | rhs_x, | |||
const Vector & | rhs_s, | |||
const Vector & | rhs_c, | |||
const Vector & | rhs_d, | |||
Vector & | sol_x, | |||
Vector & | sol_s, | |||
Vector & | sol_c, | |||
Vector & | sol_d, | |||
bool | check_NegEVals, | |||
Index | numberOfNegEVals | |||
) | [inline, virtual] |
Set up the augmented system and solve it for a given right hand side.
If desired (i.e. if check_NegEVals is true), then the solution is only computed if the number of negative eigenvalues matches numberOfNegEVals.
The return value is the return value of the linear solver object.
Reimplemented in AugRestoSystemSolver, and LowRankAugSystemSolver.
References AugSystemSolver::MultiSolve().
Referenced by AugSystemSolver::MultiSolve().
virtual ESymSolverStatus MultiSolve | ( | const SymMatrix * | W, | |
double | W_factor, | |||
const Vector * | D_x, | |||
double | delta_x, | |||
const Vector * | D_s, | |||
double | delta_s, | |||
const Matrix * | J_c, | |||
const Vector * | D_c, | |||
double | delta_c, | |||
const Matrix * | J_d, | |||
const Vector * | D_d, | |||
double | delta_d, | |||
std::vector< SmartPtr< const Vector > > & | rhs_xV, | |||
std::vector< SmartPtr< const Vector > > & | rhs_sV, | |||
std::vector< SmartPtr< const Vector > > & | rhs_cV, | |||
std::vector< SmartPtr< const Vector > > & | rhs_dV, | |||
std::vector< SmartPtr< Vector > > & | sol_xV, | |||
std::vector< SmartPtr< Vector > > & | sol_sV, | |||
std::vector< SmartPtr< Vector > > & | sol_cV, | |||
std::vector< SmartPtr< Vector > > & | sol_dV, | |||
bool | check_NegEVals, | |||
Index | numberOfNegEVals | |||
) | [inline, virtual] |
Like Solve, but for multiple right hand sides.
The inheriting class has to be overload at least one of Solve and MultiSolve.
Reimplemented in StdAugSystemSolver.
References DBG_ASSERT, fkinkryx::i, nrhs, AugSystemSolver::Solve(), and Ipopt::SYMSOLVER_SUCCESS.
Referenced by AugSystemSolver::Solve().
virtual Index NumberOfNegEVals | ( | ) | const [pure virtual] |
Number of negative eigenvalues detected during last solve.
Returns the number of negative eigenvalues of the most recent factorized matrix. This must not be called if the linear solver does not compute this quantities (see ProvidesInertia).
Implemented in AugRestoSystemSolver, LowRankAugSystemSolver, and StdAugSystemSolver.
virtual bool ProvidesInertia | ( | ) | const [pure virtual] |
Query whether inertia is computed by linear solver.
Returns true, if linear solver provides inertia.
Implemented in AugRestoSystemSolver, LowRankAugSystemSolver, and StdAugSystemSolver.
virtual bool IncreaseQuality | ( | ) | [pure virtual] |
Request to increase quality of solution for next solve.
Ask underlying linear solver to increase quality of solution for the next solve (e.g. increase pivot tolerance). Returns false, if this is not possible (e.g. maximal pivot tolerance already used.)
Implemented in AugRestoSystemSolver, LowRankAugSystemSolver, and StdAugSystemSolver.