56 namespace NLPInterfacePack {
59 const VectorSpace::space_ptr_t& vec_space
101 namespace rcp = MemMngPack;
121 namespace rcp = MemMngPack;
137 BasisSystemComposite::get_C_N(
138 first_order_info.
Gc, &C_aggr, &N_aggr );
145 if( C_aggr == NULL ) {
146 const VectorSpace::space_ptr_t
148 space_xD = space_x->sub_space(var_dep);
149 C_ptr =
Teuchos::rcp(
new MatrixSymDiagStd(space_xD->create_member()));
150 N_ptr =
Teuchos::rcp(
new MatrixSymDiagStd(space_xD->create_member()));
151 C_aggr = C_ptr.
get();
152 N_aggr = N_ptr.
get();
157 &
C =
dyn_cast<MatrixSymDiagStd>(*C_aggr);
159 &
N =
dyn_cast<MatrixSymDiagStd>(*N_aggr);
166 Vp_S( &C.diag(), -1.0 );
168 Vp_S( &N.diag(), -10.0 );
170 if( C_ptr.
get() != NULL ) {
171 BasisSystemComposite::initialize_Gc(
void initialize(bool test_setup)
virtual vec_ptr_t sub_view(const Range1D &rng) const
Create an abstract view of a vector object .
MatrixOp * Gc
Pointer to Jacobian of equality constraints Gc (may be NULL if not set)
void initialize(bool test_setup)
Initialize the NLP for its first use.
Abstract interface for immutable, finite dimensional, coordinate vectors {abstract}.
RTOp_index_type index_type
ExampleNLPFirstOrder(const VectorSpace::space_ptr_t &vec_space, value_type xo, bool has_bounds, bool dep_bounded)
Constructor (see ExampleNLPDirect::ExampleNLPDirect()).
NLPFirstOrder::basis_sys_ptr_t basis_sys_
virtual Range1D var_dep() const
bool is_initialized() const
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
T_To & dyn_cast(T_From &from)
Struct for zero and first order quantities (pointers)
NLPFirstOrder::mat_fcty_ptr_t factory_Gc_
void imp_calc_Gc(const Vector &x, bool newx, const FirstOrderInfo &first_order_info) const
Simple example NLP subclass to illustrate how to implement the NLPObjGrad interface for a specialized...
void set_Gc(MatrixOp *Gc)
Overridden to check the concrete type of Gc.
virtual Range1D var_indep() const
vec_space_ptr_t space_x() const
void initialize(bool test_setup)
AbstractLinAlgPack::value_type value_type
void Vp_S(VectorMutable *v_lhs, const value_type &alpha)
v_lhs += alpha
vec_space_ptr_t space_c() const
const f_int const f_int & N
Matrix class for matrices composed out of a set of other matrices and vectors.
const basis_sys_ptr_t basis_sys() const
Returns an ExampleBasisSystem.
RangePack::Range1D Range1D
Subclass of BasisSystem for example NLP.
virtual void set_Gc(MatrixOp *Gc)
Set a pointer to a matrix object to be updated when this->calc_Gc() is called.
const NLPFirstOrder::mat_fcty_ptr_t factory_Gc() const