ConicBundle
Public Member Functions | Protected Attributes | List of all members
ConicBundle::QPKKTPrecondObject Class Referenceabstract

Abstract Interface for preconditioners to be used with a QPIterativeKKTSolver and a CH_Matrix_Classes::IterativeSolverObject, see Interfaces and Classes for Iterative Solvers like PCG, MINRES and PSQMR. It will depend on the system setup and the solver method which preconditioning routines are called and what requirements the preconditioners have to fulfill. Feasible combinations lie in the responsibility of the caller and are not checked for correctness. More...

#include <QPKKTPrecondObject.hxx>

Inheritance diagram for ConicBundle::QPKKTPrecondObject:
ConicBundle::CBout ConicBundle::QPKKTSubspaceHPrecond

Public Member Functions

virtual void clear ()
 reset data to empty
 
 QPKKTPrecondObject (CBout *cb=0, int cbinc=-1)
 default constructor
 
virtual ~QPKKTPrecondObject ()
 virtual destructor
 
virtual int init_data (QPSolverProxObject *Hp, QPModelBlockObject *model, const CH_Matrix_Classes::Sparsemat *A, const CH_Matrix_Classes::Indexmatrix *eq_indices, bool SchurComplAineq)=0
 returns 1 if this class is not applicable in the current data situation, otherwise it stores the data pointers and these need to stay valid throught the use of the other routines but are not deleted here More...
 
virtual int init_system (const CH_Matrix_Classes::Matrix &KKTdiagx, const CH_Matrix_Classes::Matrix &KKTdiagy, CH_Matrix_Classes::Real Hfactor, CH_Matrix_Classes::Real prec, QPSolverParameters *params)=0
 set up the primal dual KKT system for being solved for predictor and corrector rhs; the input objects KKTdiagx, KKTdiagy and Hfactor will not change during use of the preconditioner, so it suffices to store the address if they are need during application of the preconditioner
 
virtual CH_Matrix_Classes::Real get_lmin_invM1 ()
 return (an estimate of) the minimum eigenvalue of the preconditioner M1^{-1}; this is used, e.g., to correct the precission in MINRES
 
virtual int precondM1 (CH_Matrix_Classes::Matrix &)
 returns M1^{-1}*vec; default: M1=I
 
virtual int precondM2 (CH_Matrix_Classes::Matrix &)
 returns M2^{-1}vec; default: M2=I
 
virtual int precond_invG1 (CH_Matrix_Classes::Matrix &)
 for estimating the condition number with M1=G*G^T this returns G^{-1}*vec; default: G=I
 
virtual int precond_invG1tran (CH_Matrix_Classes::Matrix &)
 for estimating the condition number with M1=G*G^T this returns G^{-T}*vec; default: G=I
 
virtual CH_Matrix_Classes::Integer precond_size ()
 for estimating the condition number directly for the preconditioned part only; negative numbers indicate that the routine is not implemented
 
virtual int cond_number_mult (CH_Matrix_Classes::Matrix &, const CH_Matrix_Classes::Matrix &, const CH_Matrix_Classes::Matrix &)
 for estimating the condition number directly for the preconditioned part only
 
virtual CH_Matrix_Classes::Real get_condition_number (const CH_Matrix_Classes::Matrix &KKTdiagx, const CH_Matrix_Classes::Matrix &KKTdiagy)
 for estimating the condition number directly for the preconditioned part only
 
virtual CH_Matrix_Classes::Integer get_precond_rank ()
 for evaluation purposes with iterative solvers, return the rank of the precondiontioner used (or the number of n-vector multiplications per call)
 
virtual CH_Tools::Microseconds get_t_precond_mult ()
 for evaluation purposes with iterative solvers, return the time spent in the multiplication with the preconditioner
 
virtual void reset_t_precond_mult ()
 for evaluation purposes with iterative solvers, reset the time spent in the multiplication with the preconditioner to zero
 
- Public Member Functions inherited from ConicBundle::CBout
virtual void set_out (std::ostream *out=0, int print_level=1)
 Specifies the output level (out==NULL: no output at all, out!=NULL and level=0: errors and warnings, level>0 increasingly detailed information) More...
 
virtual void set_cbout (const CBout *cb, int incr=-1)
 Specifies the output level relative to the given CBout class. More...
 
void clear_cbout ()
 reset to default settings (out=0,print_level=1)
 
 CBout (const CBout *cb=0, int incr=-1)
 calls set_cbout
 
 CBout (std::ostream *outp, int pl=1)
 initialize correspondingly
 
 CBout (const CBout &cb, int incr=0)
 copy constructor
 
virtual bool cb_out (int pl=-1) const
 Returns true if out!=0 and (pl<print_level), pl<0 should be used for WARNINGS and ERRORS only, pl==0 for usual output.
 
std::ostream & get_out () const
 If cb_out() returned true, this returns the output stream, but it will abort if called with out==0.
 
std::ostream * get_out_ptr () const
 returns the pointer to the output stream
 
int get_print_level () const
 returns the print_level
 
virtual int mfile_data (std::ostream &out) const
 writes problem data to the given outstream
 

Protected Attributes

QPSolverProxObjectHp
 points to the quadratic cost representation, may NOT be NULL afer init
 
QPModelBlockObjectmodel
 points to the cutting model information, may be NULL
 
const CH_Matrix_Classes::SparsematA
 points to a possibly present constraint matrix, may be NULL
 
const CH_Matrix_Classes::Indexmatrixeq_indices
 if not NULL, these rows of A correspond to equations; needed for checking applicability of this Object
 
bool SchurComplAineq
 if true, the inequalities of A are Schur complemented into the H block
 
CH_Matrix_Classes::Real Hfactor
 the prox term of Hp is multiplied by this
 

Detailed Description

Abstract Interface for preconditioners to be used with a QPIterativeKKTSolver and a CH_Matrix_Classes::IterativeSolverObject, see Interfaces and Classes for Iterative Solvers like PCG, MINRES and PSQMR. It will depend on the system setup and the solver method which preconditioning routines are called and what requirements the preconditioners have to fulfill. Feasible combinations lie in the responsibility of the caller and are not checked for correctness.

As describe for QPIterativeKKTSolver the main structure is as follows:

Member Function Documentation

◆ init_data()

virtual int ConicBundle::QPKKTPrecondObject::init_data ( QPSolverProxObject Hp,
QPModelBlockObject model,
const CH_Matrix_Classes::Sparsemat A,
const CH_Matrix_Classes::Indexmatrix eq_indices,
bool  SchurComplAineq 
)
pure virtual

returns 1 if this class is not applicable in the current data situation, otherwise it stores the data pointers and these need to stay valid throught the use of the other routines but are not deleted here

Parameters
Hpmay not be be NULL
modelmay be NULL
Amay be NULL
eq_indicesif not NULL these rows of A correspond to equations
SchurComplAineqif true, the inequalities of A are Schur complemented into the H block

Implemented in ConicBundle::QPKKTSubspaceHPrecond.

Referenced by QPKKTPrecondObject().


The documentation for this class was generated from the following file: