42 #ifndef NLPIP_NLP_THYRA_MODEL_EVALUATOR_BASE_HPP
43 #define NLPIP_NLP_THYRA_MODEL_EVALUATOR_BASE_HPP
47 #include "NLPInterfacePack_NLPFirstOrder.hpp"
48 #include "AbstractLinAlgPack_VectorSpace.hpp"
49 #include "Thyra_ModelEvaluator.hpp"
50 #include "Teuchos_Assert.hpp"
51 #include "Teuchos_StandardMemberCompositionMacros.hpp"
53 namespace AbstractLinAlgPack {
class VectorSpaceThyra; }
55 namespace NLPInterfacePack {
116 const Vector&
xinit()
const;
118 const Vector&
xl()
const;
120 const Vector&
xu()
const;
124 void set_f(value_type*
f);
126 void set_c(VectorMutable*
c);
136 ,
const Vector* lambda
147 void set_Gf(VectorMutable* Gf);
158 const Vector& x,
bool newx
162 const Vector& x,
bool newx
172 const Vector& x,
bool newx
235 ,VectorMutable* *Gf_out
237 ,VectorMutable* *c_out
260 value_type obj_scale_;
262 bool force_xinit_in_bounds_;
263 index_type num_bounded_x_;
268 bool DfDp_supports_op_;
269 bool DfDp_supports_mv_;
270 VectorSpace::space_ptr_t space_x_;
274 mutable bool x_guess_bounds_updated_;
275 VectorSpace::vec_mut_ptr_t xinit_;
276 VectorSpace::vec_mut_ptr_t xl_;
277 VectorSpace::vec_mut_ptr_t xu_;
281 mutable bool model_g_updated_;
282 mutable bool model_Dg_updated_;
284 mutable bool f_updated_;
285 mutable bool c_updated_;
286 mutable bool Gf_updated_;
287 mutable bool Gc_updated_;
304 #endif // NLPIP_NLP_THYRA_MODEL_EVALUATOR_BASE_HPP
vec_space_ptr_t space_c() const
value_type max_var_bounds_viol() const
void postprocessBaseOutArgs(Thyra::ModelEvaluatorBase::OutArgs< value_type > *model_outArgs_inout, VectorMutable *Gf, value_type *f, VectorMutable *c) const
const Vector & xinit() const
void initializeBase(const Teuchos::RCP< Thyra::ModelEvaluator< value_type > > &model, const int p_idx, const int g_idx)
Initialize given a Thyra::ModelEvaluator and a description of how to interpret it.
const ZeroOrderInfo zero_order_info() const
void initialize(bool test_setup)
value_type scale_f() const
void report_final_solution(const Vector &x, const Vector *lambda, const Vector *nu, bool optimal)
bool is_initialized() const
void imp_calc_f(const Vector &x, bool newx, const ZeroOrderInfo &zero_order_info) const
const Vector & xu() const
void imp_calc_Gf(const Vector &x, bool newx, const ObjGradInfo &obj_grad_info) const
const Vector & xl() const
void copy_from_model_p(const Thyra::VectorBase< value_type > *model_p, VectorMutable *x_I) const
void copy_from_model_x(const Thyra::VectorBase< value_type > *model_x, VectorMutable *x_D) const
Implements the base NLP interface using a Thyra::ModelEvaluator object.
void preprocessBaseInOutArgs(const Vector &x, bool newx, const ZeroOrderInfo *zero_order_info, const ObjGradInfo *obj_grad_info, const NLPFirstOrder::FirstOrderInfo *first_order_info, Thyra::ModelEvaluatorBase::InArgs< value_type > *model_inArgs_inout, Thyra::ModelEvaluatorBase::OutArgs< value_type > *model_outArgs_inout, MatrixOp **Gc_out, VectorMutable **Gf_out, value_type **f_out, VectorMutable **c_out) const
void set_f(value_type *f)
NLPThyraModelEvaluatorBase()
vec_space_ptr_t space_x() const
void set_x(const Vector &x, Thyra::ModelEvaluatorBase::InArgs< value_type > *model_inArgs_inout) const
void set_c(VectorMutable *c)
void assert_is_initialized() const
STANDARD_MEMBER_COMPOSITION_MEMBERS(bool, showModelEvaluatorTrace)
Set if a trace of the model evaluations is shown or not.
void updateInitialGuessAndBounds() const
Update the initial guess and bounds .
void set_Gf(VectorMutable *Gf)
void imp_calc_c(const Vector &x, bool newx, const ZeroOrderInfo &zero_order_info) const
void evalModel(const Vector &x, bool newx, const ZeroOrderInfo *zero_order_info, const ObjGradInfo *obj_grad_info) const
size_type num_bounded_x() const
bool force_xinit_in_bounds() const
virtual VectorMutable & c()