#include <ConstrainedOptPack_MatrixKKTFullSpaceRelaxed.hpp>
Initialize the relaxed or unrelaxed KKT matrix. | |
| These operations will factorize the matrix K. If the matrix K is not full rank then a SingularMatrixException exception will be thrown. The objects G and A must support the MatrixConvertToSparseFortranCompatible (MCTSFC) interface or the exception InvalidMatrixType will be thrown. Some of the common arguments that these initialization methods share are: {itemize} G [I] Hessian matrix ( must support MESFCE interface ). A [I] Gradient of constraints matrix ( must support MESFCE interface ). out [O] Output stream to print to. This stream may be used for output after initialization also so make sure that it remains valid as long as this matrix object is is use. For no output set out=NULL. run_test [I] If set the true then many (expensive) tests will be preformed to ensure that everything is working properly. print_more [I] If set the true then a lot more output may be produced expecially if some error occurs. {itemize} Important: It is vital that the definitions of G and A do not change externally while this object is being used. To do so may invalidate the behavior of this object (especially the MatrixOp functions).
This class will try to reuse the factorization structure from the last call to initialze(...) or initialize_relaxed(...) when possible. Namely if G and A have the same dimensions and same number of nonzeros of the matrices previously factorized, it will be assumed that the structure will be the same. If this is not the case then the client should call release_memory(...) to wipe the slate clean and start over before calling initialize...(...) again. | |
| void | initialize (const MatrixOp &G, const MatrixOp &A, std::ostream *out=0, EPrintMoreOrLess print_what=PRINT_LESS, ERunTests test_what=NO_TESTS) |
| Initialize the nonrelaxed matrix. | |
| void | initialize_relaxed (const MatrixOp &G, const MatrixOp &A, const DVectorSlice &c, value_type bigM=1e+10, std::ostream *out=0, EPrintMoreOrLess print_what=PRINT_LESS, ERunTests test_what=NO_TESTS) |
| Initialize the relaxed matrix. | |
| void | set_uninitialized () |
| Set the matrix to uninitialized. | |
| void | release_memory () |
| Clear all allocated storage. | |
Public Types | |
| typedef AbstractLinAlgPack::DirectSparseFortranCompatibleSolver | DirectSparseFortranCompatibleSolver |
| | |
| enum | ERunTests |
| More... | |
| enum | EPrintMoreOrLess |
| More... | |
Public Member Functions | |
| void | set_direct_solver (const Teuchos::RefCountPtr< DirectSparseFortranCompatibleSolver > &direct_solver) |
| <<std comp="">> members for the direct sparse linear solver | |
| MatrixKKTFullSpaceRelaxed (const direct_solver_ptr_t &direct_solver=0) | |
| | |
| size_type | rows () const |
| | |
| size_type | cols () const |
| | |
| std::ostream & | output (std::ostream &out) const |
| | |
| MatrixOp & | operator= (const MatrixOp &m) |
| | |
| void | Vp_StMtV (DVectorSlice *vs_lhs, value_type alpha, BLAS_Cpp::Transp trans_rhs1, const DVectorSlice &vs_rhs2, value_type beta) const |
| (2) vs_lhs = alpha * op(M_rhs1) * vs_rhs2 + beta * vs_lhs (BLAS xGEMV) | |
| void | V_InvMtV (DVectorSlice *v_lhs, BLAS_Cpp::Transp trans_rhs1, const DVectorSlice &vs_rhs2) const |
| (1) v_lhs = inv(op(M_rhs1)) * vs_rhs2 | |
| FortranTypes::f_int | num_nonzeros (EExtractRegion extract_region) const |
| | |
| void | coor_extract_nonzeros (EExtractRegion extract_region, const FortranTypes::f_int len_Aval, FortranTypes::f_dbl_prec Aval[], const FortranTypes::f_int len_Aij, FortranTypes::f_int Arow[], FortranTypes::f_int Acol[], const FortranTypes::f_int row_offset, const FortranTypes::f_int col_offset) const |
| | |
This class is used to represent the KKT matrix of the following relaxed QP:
{verbatim} min [ g' M ] * [ d ] + 1/2 * [ d' eta ] * [ G ] * [ d ] [ eta ] [ M ] [ eta ]
s.t. [ A' -c ] * [ d ] + c = 0 [ eta ] {verbatim}
The only matrix actually factorized is:
{verbatim} K_bar = [ G A ] [ A' ] {verbatim}
The class has two modes.
First mode is to not include the relaxation term and therefore the KKT matrix is:
{verbatim} K = [ G A ] [ A' ] {verbatim}
The second mode is the use the relaxation and he represented matrix is:
{verbatim} [ G A ] K = [ M -c' ] [ A' -c ] {verbatim}
This class uses an aggregate DirectSparseFortranCompatibleSolver (DSFCS) object to factorize K above and then to solve for the linear systems involving K.
Definition at line 81 of file ConstrainedOptPack_MatrixKKTFullSpaceRelaxed.hpp.
|
|
Definition at line 89 of file ConstrainedOptPack_MatrixKKTFullSpaceRelaxed.hpp. |
|
|
Definition at line 104 of file ConstrainedOptPack_MatrixKKTFullSpaceRelaxed.hpp. |
|
|
Definition at line 107 of file ConstrainedOptPack_MatrixKKTFullSpaceRelaxed.hpp. |
|
|
Definition at line 45 of file ConstrainedOptPack_MatrixKKTFullSpaceRelaxed.cpp. |
|
|
<<std comp="">> members for the direct sparse linear solver
Definition at line 110 of file ConstrainedOptPack_MatrixKKTFullSpaceRelaxed.hpp. |
|
||||||||||||||||||||||||
|
Initialize the nonrelaxed matrix.
Definition at line 55 of file ConstrainedOptPack_MatrixKKTFullSpaceRelaxed.cpp. |
|
||||||||||||||||||||||||||||||||
|
Initialize the relaxed matrix. If the unrelaxed QP is well scaled (near 1.0) then a reasonable value for bigM = M might be 1e+10 however this is problem specific. Definition at line 81 of file ConstrainedOptPack_MatrixKKTFullSpaceRelaxed.cpp. |
|
|
Set the matrix to uninitialized. The purpose of this method is for the client to specifically state that it is done using this object for now. This is to avoid problems where the definitions of G and A might change and then another client unknowingly trys to use this object. Note that this does not erase storage of the factorization structure for example. Definition at line 90 of file ConstrainedOptPack_MatrixKKTFullSpaceRelaxed.cpp. |
|
|
Clear all allocated storage. The client should call this routine if he wants the new KKT matrix to be reanalyze and factorized the next time initialize...(...) is called. Definition at line 97 of file ConstrainedOptPack_MatrixKKTFullSpaceRelaxed.cpp. |
|
|
Definition at line 107 of file ConstrainedOptPack_MatrixKKTFullSpaceRelaxed.cpp. |
|
|
Definition at line 113 of file ConstrainedOptPack_MatrixKKTFullSpaceRelaxed.cpp. |
|
|
Definition at line 121 of file ConstrainedOptPack_MatrixKKTFullSpaceRelaxed.cpp. |
|
|
Definition at line 129 of file ConstrainedOptPack_MatrixKKTFullSpaceRelaxed.cpp. |
|
||||||||||||||||||||||||
|
(2) vs_lhs = alpha * op(M_rhs1) * vs_rhs2 + beta * vs_lhs (BLAS xGEMV)
Definition at line 137 of file ConstrainedOptPack_MatrixKKTFullSpaceRelaxed.cpp. |
|
||||||||||||||||
|
(1) v_lhs = inv(op(M_rhs1)) * vs_rhs2
Definition at line 183 of file ConstrainedOptPack_MatrixKKTFullSpaceRelaxed.cpp. |
|
|
Definition at line 194 of file ConstrainedOptPack_MatrixKKTFullSpaceRelaxed.cpp. |
|
||||||||||||||||||||||||||||||||||||
|
Definition at line 218 of file ConstrainedOptPack_MatrixKKTFullSpaceRelaxed.cpp. |
1.3.9.1