PIPS-NLP
|
#include <sLinsys.h>
Public Member Functions | |
sLinsys (sFactory *factory, sData *prob) | |
sLinsys (sFactory *factory, sData *prob, OoqpVector *dd, OoqpVector *dq, OoqpVector *nomegaInv, OoqpVector *rhs, OoqpVector *additiveDiag_=NULL) | |
virtual | ~sLinsys () |
virtual void | factor (Data *prob, Variables *vars, RegularizationAlg *RegInfo) |
virtual void | factor (Data *prob, Variables *vars) |
virtual int | factor2 (sData *prob, Variables *vars)=0 |
virtual void | Lsolve (sData *prob, OoqpVector &x)=0 |
virtual void | Dsolve (sData *prob, OoqpVector &x)=0 |
virtual void | Ltsolve (sData *prob, OoqpVector &x)=0 |
virtual void | Ltsolve2 (sData *prob, StochVector &x, SimpleVector &xp)=0 |
virtual void | solveCompressed (OoqpVector &rhs) |
virtual void | putXDiagonal (OoqpVector &xdiag_)=0 |
virtual void | putSDiagonal (OoqpVector &sdiag_)=0 |
virtual void | putYDualDiagonal (OoqpVector &ydiag_)=0 |
virtual void | putZDiagonal (OoqpVector &zdiag)=0 |
virtual void | setAdditiveDiagonal ()=0 |
void | joinRHS (OoqpVector &rhs_in, OoqpVector &rhs1_in, OoqpVector &rhs2_in, OoqpVector &rhs3_in) |
void | separateVars (OoqpVector &x_in, OoqpVector &y_in, OoqpVector &z_in, OoqpVector &vars_in) |
void | joinRHSXSYZ (OoqpVector &rhs_in, OoqpVector &rhs1_in, OoqpVector &rhs2_in, OoqpVector &rhs3_in, OoqpVector &rhs4_in) |
void | separateVarsXSYZ (OoqpVector &x_in, OoqpVector &s_in, OoqpVector &y_in, OoqpVector &z_in, OoqpVector &vars_in) |
virtual void | sync ()=0 |
virtual void | deleteChildren ()=0 |
virtual void | addLnizi (sData *prob, OoqpVector &z0, OoqpVector &zi) |
void | LniTransMult (sData *prob, OoqpVector &y, double alpha, OoqpVector &x) |
virtual void | allocU (DenseGenMatrix **Ut, int np) |
virtual void | allocV (DenseGenMatrix **V, int np) |
virtual void | computeU_V (sData *prob, DenseGenMatrix *U, DenseGenMatrix *V) |
virtual void | addTermToDenseSchurCompl (sData *prob, DenseSymMatrix &SC) |
virtual void | addColsToDenseSchurCompl (sData *prob, DenseGenMatrix &out, int startcol, int endcol) |
virtual void | symAddColsToDenseSchurCompl (sData *prob, double *out, int startcol, int endcol) |
virtual void | addTermToSchurResidual (sData *prob, SimpleVector &res, SimpleVector &x) |
virtual int | GetNegEigVal () |
virtual void | _backSolve (sData *prob, OoqpVector &ParSol_, OoqpVector &Vec_, StochVector *End_Par_Pos_) |
virtual void | _addTargetParsLnizi (sData *prob, OoqpVector &ParSol_, OoqpVector &Vec_, OoqpVector *goal_Par) |
virtual void | _setupColOfBordMat (sData *prob, OoqpVector *rhs_St, const int ColIDX, bool &allzero, const int aimlevel) |
virtual void | _assembleSC (sData *prob, OoqpVector *rhs_St_in, const int ColIDX, const int aimlevel, DenseSymMatrix &SC) |
virtual void | _setupYaddLniTx (sData *prob, OoqpVector &y_, double alpha, SimpleVector &x, const int aimlevel) |
![]() | |
NlpGenLinsys (NlpGen *factory, NlpGenData *data, LinearAlgebraPackage *la) | |
NlpGenLinsys () | |
~NlpGenLinsys () | |
virtual void | solve (Data *prob, Variables *vars, Residuals *res, Variables *step) |
virtual void | solve_NTsteps (Data *prob, Variables *vars, Residuals *resids, Variables *Nstep, Variables *Tstep, Variables *NTstep) |
virtual void | solve_IterRefine (Data *prob_in, Variables *vars_in, Residuals *res_in, Variables *step_in, Residuals *KKT_Resid_in, Variables *KKT_sol_in) |
virtual void | solveXYZS (OoqpVector &stepx, OoqpVector &stepy, OoqpVector &stepz, OoqpVector &steps, OoqpVector &ztemp, NlpGenData *data) |
virtual void | solveCompressedAugXSYZ (OoqpVector &stepx, OoqpVector &steps, OoqpVector &stepy, OoqpVector &stepz, NlpGenData *prob) |
virtual void | solveCompressedAugXSYZ_PETSC (OoqpVector &stepx, OoqpVector &steps, OoqpVector &stepy, OoqpVector &stepz, NlpGenData *prob) |
virtual void | solveBiCGStab (OoqpVector &stepx, OoqpVector &steps, OoqpVector &stepy, OoqpVector &stepz, NlpGenData *data) |
virtual void | computeDiagonals (OoqpVector &dd, OoqpVector &omega, OoqpVector &t, OoqpVector &lambda, OoqpVector &u, OoqpVector &pi, OoqpVector &v, OoqpVector &gamma, OoqpVector &w, OoqpVector &phi) |
virtual void | solveCompressedBiCGStab (OoqpVector &stepx, OoqpVector &stepy, OoqpVector &stepz, NlpGenData *data) |
virtual void | solveCompressedIterRefin (OoqpVector &stepx, OoqpVector &stepy, OoqpVector &stepz, NlpGenData *data) |
virtual void | matXYZMult (double beta, OoqpVector &res, double alpha, OoqpVector &sol, NlpGenData *data, OoqpVector &solx, OoqpVector &soly, OoqpVector &solz) |
virtual void | matXSYZMult (double beta, OoqpVector &res, double alpha, OoqpVector &sol, NlpGenData *data, OoqpVector &solx, OoqpVector &sols, OoqpVector &soly, OoqpVector &solz) |
virtual void | factorNoMatChange (Data *prob_in, Variables *vars_in, RegularizationAlg *RegInfo) |
virtual void | UpdateMatrices (Data *prob_in, int const updateLevel=2) |
virtual double | computeResidual (NlpGenData *data, OoqpVector &res_, OoqpVector &sol_, OoqpVector &solx_, OoqpVector &sols_, OoqpVector &soly_, OoqpVector &solz_) |
virtual double | computeResidual_FullKKT (NlpGenData *data, NlpGenResiduals *res_, NlpGenVars *sol_, NlpGenVars *var_) |
virtual double | eval_xWx (NlpGenData *prob, NlpGenResiduals *resid, NlpGenVars *steps) |
virtual void | computeQuantitiesForDualReg (NlpGenData *prob, NlpGenVars *vars, NlpGenResiduals *resid, NlpGenVars *steps, double *dualRegQuantities) |
virtual void | setXDiagonal (OoqpVector &xdiag)=0 |
virtual void | setSDiagonal (OoqpVector &sdiag)=0 |
virtual void | setYDiagonal (OoqpVector &ydiag)=0 |
virtual void | setZDiagonal (OoqpVector &zdiag)=0 |
virtual void | copyXSYZ_fromArray (OoqpVector &vec_xsyz, double *array_in, const int nb_col) |
virtual void | copyXSYZ_toArray (OoqpVector &vec_xsyz, double *array_in, const int nb_col) |
![]() | |
virtual | ~LinearSystem () |
Public Attributes | |
int | negEigVal |
SymMatrix * | kkt |
MPI_Comm | mpiComm |
sTree * | stochNode |
bool | isActive |
![]() | |
OoqpVector * | nomegaInv |
OoqpVector * | rhs |
OoqpVector * | rhs_back |
NlpGen * | factory |
long long | nx |
long long | my |
long long | mz |
double | priReg |
double | dualReg |
OoqpVector * | dd |
OoqpVector * | dq |
OoqpVector * | temp_diagX |
OoqpVector * | temp_diagS |
OoqpVector * | temp_diagY |
OoqpVector * | temp_diagZ |
OoqpVector * | additiveDiag |
OoqpVector * | ixupp |
OoqpVector * | icupp |
OoqpVector * | ixlow |
OoqpVector * | iclow |
int | nxupp |
int | nxlow |
int | mcupp |
int | mclow |
int | num_slacks |
int | useRefs |
OoqpVector * | sol |
OoqpVector * | res |
OoqpVector * | resx |
OoqpVector * | ress |
OoqpVector * | resy |
OoqpVector * | resz |
OoqpVector * | sol2 |
OoqpVector * | res2 |
OoqpVector * | res3 |
OoqpVector * | res4 |
OoqpVector * | res5 |
OoqpVector * | sol2Bicg |
OoqpVector * | res2Bicg |
OoqpVector * | res3Bicg |
OoqpVector * | res4Bicg |
OoqpVector * | res5Bicg |
int | KryIter |
bool | allocateSpace |
Protected Member Functions | |
sLinsys () | |
Protected Attributes | |
int | locnx |
int | locmy |
int | locmz |
DoubleLinearSolver * | solver |
sData * | data |
![]() | |
bool | fullQ |
sLinsys::sLinsys | ( | sFactory * | factory, |
sData * | prob, | ||
OoqpVector * | dd, | ||
OoqpVector * | dq, | ||
OoqpVector * | nomegaInv, | ||
OoqpVector * | rhs, | ||
OoqpVector * | additiveDiag_ = NULL |
||
) |
|
virtual |
|
inlineprotected |
|
virtual |
Reimplemented in sDummyLinsys.
|
virtual |
Reimplemented in sDummyLinsys.
|
virtual |
Reimplemented in sDummyLinsys.
|
virtual |
Reimplemented in sDummyLinsys.
|
virtual |
|
virtual |
|
virtual |
[ R^i^T Ai^T Ci^T ] [ ] z0 -= [ 0 0 0 ] * Li\ [ zi ] [ 0 0 0 ] [ ]
if gOuterSolve>=3 && separateHandDiag==0 [ R^i^T 0 Ai^T Ci^T ] [ ] z0 -= [ 0 0 0 0 ] * Li\ [ zi ] [ 0 0 0 0 ] [ ]
Reimplemented in sDummyLinsys.
|
virtual |
Method(s) that use a memory-friendly mechanism for computing the terms from the Schur Complement
Computes U = Gi * inv(H_i) * Gi^T. [ R 0 0 ] Gi^T = [ A 0 0 ] [ C 0 0]
A and C are the recourse eq. and ineq. matrices, R is the cross Hessian term.
if gOuterSolve>=3 && separateHandDiag==0 [ R 0 0 ] [ 0 0 0 ] <— for the Ineq Cons slack var Gi^T = [ A 0 0 ] [ C 0 0]
A and C are the recourse eq. and ineq. matrices, R is the cross Hessian term.
|
virtual |
Used in the iterative refinement for the dense Schur complement systems Computes res += [0 A^T C^T ]*inv(KKT)*[0;A;C] x
Reimplemented in sDummyLinsys.
|
virtual |
Methods that use dense matrices U and V to compute the terms from the Schur complement.
Reimplemented in sDummyLinsys.
|
virtual |
Reimplemented in sDummyLinsys.
|
virtual |
Computes U = Li^T. [ 0 0 0 ] Gi^T = [ A 0 0 ] [ C 0 0]
We have special structure here: [ 0 ] U = Li\ [ A ] , U is (nx+my+mz)-by-(np) [ C ]
V = Di
Reimplemented in sDummyLinsys.
|
pure virtual |
Implemented in sDummyLinsys, sLinsysLeaf, and sLinsysRoot.
|
pure virtual |
Implemented in sLinsysRoot, sLinsysLeaf, sLinsysRootAggregation, and sDummyLinsys.
|
virtual |
sets up the matrix for the main linear system in "augmented system" form. The actual factorization is performed by a routine specific to either the sparse or dense case.
Reimplemented from NlpGenLinsys.
factorizes the matrix, stores data related to the factorization to prepare for later calls to "solve"
Reimplemented from NlpGenLinsys.
Implemented in sLinsysLeaf, sLinsysRoot, sLinsysRootAggregation, and sDummyLinsys.
|
inlinevirtual |
|
virtual |
assembles a single vector object from three given vectors
rhs | (output) final joined vector |
rhs1 | (input) first part of rhs |
rhs2 | (input) middle part of rhs |
rhs3 | (input) last part of rhs |
Reimplemented from NlpGenLinsys.
|
virtual |
Reimplemented from NlpGenLinsys.
void sLinsys::LniTransMult | ( | sData * | prob, |
OoqpVector & | y, | ||
double | alpha, | ||
OoqpVector & | x | ||
) |
y += alpha * Lni^T * x
memopt
|
pure virtual |
Implemented in sLinsysRoot, sLinsysLeaf, sLinsysRootAggregation, and sDummyLinsys.
|
pure virtual |
Implemented in sLinsysRoot, sLinsysLeaf, sLinsysRootAggregation, and sDummyLinsys.
|
pure virtual |
Implemented in sLinsysLeaf, sLinsysRoot, and sDummyLinsys.
|
pure virtual |
places the diagonal resulting from the bounds on Cx into the augmented system matrix — corresponding to slack variables S
Implements NlpGenLinsys.
Implemented in sLinsysLeaf, sLinsysRoot, and sDummyLinsys.
|
pure virtual |
places the diagonal resulting from the bounds on x into the augmented system matrix — corresponding to pri variables X
Implements NlpGenLinsys.
Implemented in sLinsysLeaf, sLinsysRoot, and sDummyLinsys.
|
pure virtual |
places the diagonal resulting from the bounds on x into the augmented system matrix — for Regularization dual Y
Implements NlpGenLinsys.
Implemented in sLinsysLeaf, sLinsysRoot, and sDummyLinsys.
|
pure virtual |
places the diagonal resulting from the bounds on Cx into the augmented system matrix — corresponding to slack variables S, z is the dual for s
Implements NlpGenLinsys.
Implemented in sLinsysLeaf, sLinsysRoot, and sDummyLinsys.
|
virtual |
extracts three component vectors from a given aggregated vector.
vars | (input) aggregated vector |
vars1 | (output) first part of vars |
vars2 | (output) middle part of vars |
vars3 | (output) last part of vars |
Reimplemented from NlpGenLinsys.
|
virtual |
Reimplemented from NlpGenLinsys.
|
pure virtual |
Implemented in sLinsysLeaf, sLinsysRoot, and sDummyLinsys.
|
virtual |
perform the actual solve using the factors produced in factor.
rhs | on input contains the aggregated right-hand side of the augmented system; on output contains the solution in aggregated form |
Implements NlpGenLinsys.
Reimplemented in sDummyLinsys.
|
virtual |
code needs to consider the cross Hessian; fixme
|
pure virtual |
Implemented in sDummyLinsys, sLinsysLeaf, and sLinsysRoot.
|
protected |
bool sLinsys::isActive |
SymMatrix* sLinsys::kkt |
|
protected |
|
protected |
|
protected |
MPI_Comm sLinsys::mpiComm |
int sLinsys::negEigVal |
|
protected |
sTree* sLinsys::stochNode |