42 #include "MoochoPack_EvalNewPointTailoredApproachOrthogonal_Step.hpp"
43 #include "ConstrainedOptPack_MatrixIdentConcatStd.hpp"
44 #include "NLPInterfacePack_NLPDirect.hpp"
45 #include "AbstractLinAlgPack_MatrixComposite.hpp"
46 #include "AbstractLinAlgPack_MatrixSymOpNonsing.hpp"
47 #include "AbstractLinAlgPack_MatrixSymInitDiag.hpp"
48 #include "AbstractLinAlgPack_VectorSpace.hpp"
49 #include "AbstractLinAlgPack_VectorStdOps.hpp"
50 #include "AbstractLinAlgPack_MatrixOpOut.hpp"
51 #include "AbstractLinAlgPack_AssertOp.hpp"
52 #include "AbstractLinAlgPack_LinAlgOpPack.hpp"
53 #include "Teuchos_dyn_cast.hpp"
54 #include "Teuchos_Assert.hpp"
56 namespace MoochoPack {
58 EvalNewPointTailoredApproachOrthogonal_Step::EvalNewPointTailoredApproachOrthogonal_Step(
59 const deriv_tester_ptr_t &deriv_tester
60 ,
const bounds_tester_ptr_t &bounds_tester
76 *Y_orth = Y ? &
dyn_cast<MatrixIdentConcatStd>(*Y) : NULL;
78 *Uy_cpst = Uy ? &
dyn_cast<MatrixComposite>(*Uy) : NULL;
81 Y_orth->set_uninitialized();
91 ,EJournalOutputLevel olevel
95 namespace rcp = MemMngPack;
105 con_decomp = nlp.con_decomp(),
106 con_undecomp = nlp.con_undecomp();
113 *Y_orth = Y ? &
dyn_cast<MatrixIdentConcatStd>(*Y) : NULL;
115 *Uy_cpst = Uy ? &
dyn_cast<MatrixComposite>(*Uy) : NULL;
135 ,nlp.space_x()->sub_space(var_dep)->clone()
136 ,MatrixIdentConcatStd::BOTTOM
144 if(S_ptr_.
get() == NULL) {
145 S_ptr_ = nlp.factory_S()->create();
148 dyn_cast<MatrixSymInitDiag>(*S_ptr_).init_identity(D->space_rows());
160 ,EJournalOutputLevel olevel
168 using LinAlgOpPack::V_MtV;
170 const MatrixSymOpNonsing &S = *S_ptr_;
172 VectorSpace::vec_mut_ptr_t
173 tIa = D.space_rows().create_member(),
174 tIb = D.space_rows().create_member();
187 V_MtV( tIa.get(), D,
trans, *py );
189 Vp_StMtV( py, -1.0, D, no_trans, *tIb );
193 std::ostream& out,
const std::string& L
197 << L <<
"*** Orthogonal decomposition\n"
198 << L <<
"py = inv(I + D*D') * py <: space_range\n"
199 << L <<
"Y = [ I ; -D' ] <: space_x|space_range\n"
T_To & dyn_cast(T_From &from)
void print_calc_py_Y_Uy(std::ostream &out, const std::string &leading_str) const
void calc_py_Y_Uy(const NLPDirect &nlp, const D_ptr_t &D, VectorMutable *py, MatrixOp *Y, MatrixOp *Uy, EJournalOutputLevel olevel, std::ostream &out)
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
void syrk(const MatrixOp &mwo_rhs, BLAS_Cpp::Transp M_trans, value_type alpha, value_type beta, MatrixSymOp *sym_lhs)
void V_InvMtV(VectorMutable *v_lhs, const MatrixNonsing &M_rhs1, BLAS_Cpp::Transp trans_rhs1, const Vector &v_rhs2)
void Vp_StMtV(VectorMutable *v_lhs, value_type alpha, const MatrixOp &M_rhs1, BLAS_Cpp::Transp trans_rhs1, const Vector &v_rhs2, value_type beta=1.0)
void uninitialize_Y_Uy(MatrixOp *Y, MatrixOp *Uy)
void recalc_py(const MatrixOp &D, VectorMutable *py, EJournalOutputLevel olevel, std::ostream &out)
Base class for evaluating a new point for the "Tailored Approach".
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)