MOOCHO (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
NLPInterfacePack::NLPDirectThyraModelEvaluator Class Reference

Implement the NLPFirstOrder interface using a Thyra::ModelEvaluator object. More...

#include <NLPInterfacePack_NLPDirectThyraModelEvaluator.hpp>

Inheritance diagram for NLPInterfacePack::NLPDirectThyraModelEvaluator:
Inheritance graph
[legend]

Public Member Functions

 STANDARD_COMPOSITION_MEMBERS (Thyra::DirectionalFiniteDiffCalculator< value_type >, objDirecFiniteDiffCalculator)
 Utility object that computes directional finite differences for objective. More...
 
 STANDARD_COMPOSITION_MEMBERS (Thyra::DirectionalFiniteDiffCalculator< value_type >, conDirecFiniteDiffCalculator)
 Utility object that computes directional finite differences for constraints. More...
 
 STANDARD_MEMBER_COMPOSITION_MEMBERS (bool, DfDp_is_const)
 Set if model.DfDp is constant or not. More...
 
 NLPDirectThyraModelEvaluator ()
 Initialize to uninitialized. More...
 
 NLPDirectThyraModelEvaluator (const Teuchos::RCP< Thyra::ModelEvaluator< value_type > > &model, const int p_idx, const int g_idx, const objDirecFiniteDiffCalculator_ptr_t objDirecFiniteDiffCalculator=Teuchos::null, const conDirecFiniteDiffCalculator_ptr_t conDirecFiniteDiffCalculator=Teuchos::null)
 Calls initialize(). More...
 
void initialize (const Teuchos::RCP< Thyra::ModelEvaluator< value_type > > &model, const int p_idx, const int g_idx, const objDirecFiniteDiffCalculator_ptr_t objDirecFiniteDiffCalculator=Teuchos::null, const conDirecFiniteDiffCalculator_ptr_t conDirecFiniteDiffCalculator=Teuchos::null)
 .Initialize given a Thyra::ModelEvaluator and a description of how to interpret it. More...
 
- Public Member Functions inherited from NLPInterfacePack::NLPDirect
void set_factories (const mat_sym_fcty_ptr_t &factory_transDtD, const mat_sym_nonsing_fcty_ptr_t &factory_S)
 Initialize the factory objects for the special matrices for D'*D and S = I + D'*D. More...
 
virtual size_type r () const
 Returns the number of decomposed equality constraints (r <= m). More...
 
virtual Range1D con_decomp () const
 Return the range of decomposed equality constraints. More...
 
virtual Range1D con_undecomp () const
 Return the range of undecomposed equality constraints. More...
 
virtual const mat_fcty_ptr_t factory_GcU () const
 Return a matrix factory object for creating GcU. More...
 
virtual const mat_fcty_ptr_t factory_Uz () const
 Return a matrix factory object for Uz = F + E * D. More...
 
virtual const mat_fcty_ptr_t factory_GcUD () const
 Return a matrix factory object for a mutable matrix compatible with GcU(var_dep). More...
 
virtual const mat_sym_fcty_ptr_t factory_transDtD () const
 Returns a matrix factory for the result of J = D'*D More...
 
- Public Member Functions inherited from NLPInterfacePack::NLPObjGrad
 NLPObjGrad ()
 Initialize to no reference set to calculation quanities. More...
 
virtual VectorMutableget_Gf ()
 Return pointer passed to this->set_Gf(). More...
 
virtual VectorMutableGf ()
 Returns non-const *this->get_Gf(). More...
 
virtual const VectorGf () const
 Returns const *this->get_Gf(). More...
 
virtual void calc_Gf (const Vector &x, bool newx=true) const
 Update the vector for Gf at the point x and put it in the stored reference. More...
 
virtual size_type num_Gf_evals () const
 Objective gradient evaluations count. More...
 
- Public Member Functions inherited from NLPInterfacePack::NLP
const ZeroOrderInfo zero_order_info () const
 Return pointer to set quantities. More...
 
const ZeroOrderInfo zero_order_info_breve () const
 Return pointer to set hat quantities. More...
 
 NLP ()
 Initialize to no reference set to calculation quanities. More...
 
virtual ~NLP ()
 Destructor that cleans all the memory it owns. More...
 
virtual void set_options (const options_ptr_t &options)
 Set the options that this NLP may be interested in. More...
 
virtual const options_ptr_tget_options () const
 Get the OptionsFromStream object being used to extract the options from. More...
 
virtual size_type n () const
 Return the number of variables. More...
 
virtual size_type m () const
 Return the number of general equality constraints. More...
 
virtual void get_init_lagrange_mult (VectorMutable *lambda, VectorMutable *nu) const
 Get the initial value of the Lagrange multipliers lambda. More...
 
virtual value_type * get_f ()
 Return pointer passed to this->set_f(). More...
 
virtual value_type & f ()
 Returns non-const *this->get_f(). More...
 
virtual const value_type & f () const
 Returns const *this->get_f(). More...
 
virtual VectorMutableget_c ()
 Return pointer passed to this->set_c(). More...
 
virtual VectorMutablec ()
 Returns non-const *this->get_c(). More...
 
virtual const Vectorc () const
 Returns const *this->get_c(). More...
 
virtual void calc_f (const Vector &x, bool newx=true) const
 Update the value for the objective f at the point x and put it in the stored reference. More...
 
virtual void calc_c (const Vector &x, bool newx=true) const
 Update the constraint residual vector for c at the point x and put it in the stored reference. More...
 
virtual size_type num_f_evals () const
 Gives the number of object function f(x) evaluations called by the solver since initialize() was called. More...
 
virtual size_type num_c_evals () const
 Gives the number of constraint function c(x) evaluations called by the solver since initialize() was called. Throws exception if this->m() == 0. More...
 
virtual size_type ns () const
 Return the number of slack variables (i.e. number of general inequalities). More...
 
virtual vec_space_ptr_t space_c_breve () const
 Vector space object for the original equalities c_breve(x_breve) More...
 
virtual vec_space_ptr_t space_h_breve () const
 Vector space object for the original inequalities h_breve(x_breve) More...
 
virtual const Vectorhl_breve () const
 Returns a reference to the vector of lower bounds on the general inequality constraints h_breve(x_breve). More...
 
virtual const Vectorhu_breve () const
 Returns a reference to the vector of upper bounds on the general inequality constraints h_breve(x_breve). More...
 
virtual void set_c_breve (VectorMutable *c_breve)
 Set a pointer to a vector to be updated when this->calc_c_breve() is called. More...
 
virtual VectorMutableget_c_breve ()
 Return pointer passed to this->set_c_breve(). More...
 
virtual VectorMutablec_breve ()
 Returns non-const *this->get_c_breve(). More...
 
virtual const Vectorc_breve () const
 Returns const *this->get_c_breve(). More...
 
virtual void set_h_breve (VectorMutable *h_breve)
 Set a pointer to a vector to be updated when this->calc_h_breve() is called. More...
 
virtual VectorMutableget_h_breve ()
 Return pointer passed to this->set_h_breve(). More...
 
virtual VectorMutableh_breve ()
 Returns non-const *this->get_h_breve(). More...
 
virtual const Vectorh_breve () const
 Returns const *this->get_h_breve(). More...
 
virtual const Permutation & P_var () const
 Return the permutation object for the variables. More...
 
virtual const Permutation & P_equ () const
 Return the permutation object for the constraints. More...
 
virtual void calc_c_breve (const Vector &x, bool newx=true) const
 Update the constraint residual vector for c_breve at the point x and put it in the stored reference. More...
 
virtual void calc_h_breve (const Vector &x, bool newx=true) const
 Update the constraint residual vector for h_breve at the point x and put it in the stored reference. More...
 
- Public Member Functions inherited from Teuchos::VerboseObject< NLP >
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT
RCP< const ParameterList
getValidVerboseObjectSublist ()
 
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT
void 
setupVerboseObjectSublist (ParameterList *paramList)
 
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT
void 
readVerboseObjectSublist (ParameterList *paramList, RCP< FancyOStream > *oStream, EVerbosityLevel *verbLevel)
 
void readVerboseObjectSublist (ParameterList *paramList, VerboseObject< NLP > *verboseObject)
 
 VerboseObject (const EVerbosityLevel verbLevel=VERB_DEFAULT, const RCP< FancyOStream > &oStream=Teuchos::null)
 
virtual void initializeVerboseObject (const EVerbosityLevel verbLevel=VERB_DEFAULT, const RCP< FancyOStream > &oStream=Teuchos::null)
 
virtual const VerboseObjectsetVerbLevel (const EVerbosityLevel verbLevel) const
 
virtual const VerboseObjectsetOverridingVerbLevel (const EVerbosityLevel verbLevel) const
 
virtual EVerbosityLevel getVerbLevel () const
 
- Public Member Functions inherited from NLPInterfacePack::NLPThyraModelEvaluatorBase
 STANDARD_MEMBER_COMPOSITION_MEMBERS (bool, showModelEvaluatorTrace)
 Set if a trace of the model evaluations is shown or not. More...
 
void initialize (bool test_setup)
 
bool is_initialized () const
 
vec_space_ptr_t space_x () const
 
vec_space_ptr_t space_c () const
 
size_type num_bounded_x () const
 
void force_xinit_in_bounds (bool force_xinit_in_bounds)
 
bool force_xinit_in_bounds () const
 
const Vectorxinit () const
 
const Vectorxl () const
 
const Vectorxu () const
 
value_type max_var_bounds_viol () const
 
void set_f (value_type *f)
 
void set_c (VectorMutable *c)
 
void unset_quantities ()
 
void scale_f (value_type scale_f)
 
value_type scale_f () const
 
void report_final_solution (const Vector &x, const Vector *lambda, const Vector *nu, bool optimal)
 
void set_Gf (VectorMutable *Gf)
 

Private Attributes

Teuchos::RCP
< Thyra::LinearOpWithSolveBase
< value_type > > 
thyra_C_
 
Teuchos::RCP
< Thyra::MultiVectorBase
< value_type > > 
thyra_N_
 

Overridden public members from NLP

void initialize (bool test_setup)
 
void unset_quantities ()
 

Overridden public members from NLPObjGrad

bool supports_Gf () const
 
bool supports_Gf_prod () const
 
value_type calc_Gf_prod (const Vector &x, const Vector &d, bool newx) const
 

Overridden public members from NLPDirect

Range1D var_dep () const
 
Range1D var_indep () const
 
const mat_fcty_ptr_t factory_D () const
 
const mat_sym_nonsing_fcty_ptr_t factory_S () const
 
void calc_point (const Vector &x, value_type *f, VectorMutable *c, bool recalc_c, VectorMutable *Gf, VectorMutable *py, VectorMutable *rGf, MatrixOp *GcU, MatrixOp *D, MatrixOp *Uz) const
 
void calc_semi_newton_step (const Vector &x, VectorMutable *c, bool recalc_c, VectorMutable *py) const
 

Additional Inherited Members

- Public Types inherited from NLPInterfacePack::NLPDirect
typedef Teuchos::RCP< const
Teuchos::AbstractFactory
< MatrixOp > > 
mat_fcty_ptr_t
 
typedef Teuchos::RCP< const
Teuchos::AbstractFactory
< MatrixSymOp > > 
mat_sym_fcty_ptr_t
 
typedef Teuchos::RCP< const
Teuchos::AbstractFactory
< MatrixSymOpNonsing > > 
mat_sym_nonsing_fcty_ptr_t
 
- Public Types inherited from NLPInterfacePack::NLP
typedef AbstractLinAlgPack::Vector Vector
 
typedef
AbstractLinAlgPack::VectorMutable 
VectorMutable
 
typedef Teuchos::RCP< const
VectorSpace > 
vec_space_ptr_t
 
typedef Teuchos::RCP< const
OptionsFromStreamPack::OptionsFromStream
options_ptr_t
 
- Static Public Member Functions inherited from NLPInterfacePack::NLP
static value_type infinite_bound ()
 Value for an infinite bound. More...
 
- Static Public Member Functions inherited from Teuchos::VerboseObject< NLP >
static void setDefaultVerbLevel (const EVerbosityLevel defaultVerbLevel)
 
static EVerbosityLevel getDefaultVerbLevel ()
 
- Protected Types inherited from NLPInterfacePack::NLPThyraModelEvaluatorBase
typedef Teuchos::RCP< const
AbstractLinAlgPack::VectorSpaceThyra
VectorSpaceThyra_ptr_t
 
- Protected Member Functions inherited from NLPInterfacePack::NLPObjGrad
const ObjGradInfo obj_grad_info () const
 Return objective gradient and zero order information. More...
 
- Protected Member Functions inherited from NLPInterfacePack::NLP
template<class T >
void assert_ref_set (T *p, std::string info) const
 Assert referece has been set for a quanity. More...
 
virtual void imp_calc_c_breve (const Vector &x, bool newx, const ZeroOrderInfo &zero_order_info_breve) const
 Overridden to compute c_breve(x_breve) and perhaps f(x) and/or h_breve(x_breve) More...
 
virtual void imp_calc_h_breve (const Vector &x, bool newx, const ZeroOrderInfo &zero_order_info_breve) const
 Overridden to compute h_breve(x_breve) and perhaps f(x) and/or c_breve(x_breve). More...
 
- Protected Member Functions inherited from NLPInterfacePack::NLPThyraModelEvaluatorBase
void evalModel (const Vector &x, bool newx, const ZeroOrderInfo *zero_order_info, const ObjGradInfo *obj_grad_info) const
 
void imp_calc_f (const Vector &x, bool newx, const ZeroOrderInfo &zero_order_info) const
 
void imp_calc_c (const Vector &x, bool newx, const ZeroOrderInfo &zero_order_info) const
 
void imp_calc_Gf (const Vector &x, bool newx, const ObjGradInfo &obj_grad_info) const
 
 NLPThyraModelEvaluatorBase ()
 
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. More...
 
void updateInitialGuessAndBounds () const
 Update the initial guess and bounds . More...
 
void assert_is_initialized () const
 
void copy_from_model_x (const Thyra::VectorBase< value_type > *model_x, VectorMutable *x_D) const
 
void copy_from_model_p (const Thyra::VectorBase< value_type > *model_p, VectorMutable *x_I) const
 
void set_x (const Vector &x, Thyra::ModelEvaluatorBase::InArgs< value_type > *model_inArgs_inout) const
 
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 postprocessBaseOutArgs (Thyra::ModelEvaluatorBase::OutArgs< value_type > *model_outArgs_inout, VectorMutable *Gf, value_type *f, VectorMutable *c) const
 
- Protected Attributes inherited from NLPInterfacePack::NLPThyraModelEvaluatorBase
bool initialized_
 
value_type obj_scale_
 
bool has_bounds_
 
bool force_xinit_in_bounds_
 
index_type num_bounded_x_
 
Teuchos::RCP
< Thyra::ModelEvaluator
< value_type > > 
model_
 
int p_idx_
 
int g_idx_
 
bool DfDp_supports_op_
 
bool DfDp_supports_mv_
 
VectorSpace::space_ptr_t space_x_
 
VectorSpaceThyra_ptr_t space_c_
 
NLPFirstOrder::mat_fcty_ptr_t factory_Gc_
 
NLPFirstOrder::basis_sys_ptr_t basis_sys_
 
bool x_guess_bounds_updated_
 
VectorSpace::vec_mut_ptr_t xinit_
 
VectorSpace::vec_mut_ptr_t xl_
 
VectorSpace::vec_mut_ptr_t xu_
 
Teuchos::RCP
< Thyra::VectorBase
< value_type > > 
model_g_
 
bool model_g_updated_
 
bool model_Dg_updated_
 
bool f_updated_
 
bool c_updated_
 
bool Gf_updated_
 
bool Gc_updated_
 

Detailed Description

Implement the NLPFirstOrder interface using a Thyra::ModelEvaluator object.

ToDo: Finish documentation!

Definition at line 58 of file NLPInterfacePack_NLPDirectThyraModelEvaluator.hpp.

Constructor & Destructor Documentation

NLPInterfacePack::NLPDirectThyraModelEvaluator::NLPDirectThyraModelEvaluator ( )

Initialize to uninitialized.

Definition at line 65 of file NLPInterfacePack_NLPDirectThyraModelEvaluator.cpp.

NLPInterfacePack::NLPDirectThyraModelEvaluator::NLPDirectThyraModelEvaluator ( const Teuchos::RCP< Thyra::ModelEvaluator< value_type > > &  model,
const int  p_idx,
const int  g_idx,
const objDirecFiniteDiffCalculator_ptr_t  objDirecFiniteDiffCalculator = Teuchos::null,
const conDirecFiniteDiffCalculator_ptr_t  conDirecFiniteDiffCalculator = Teuchos::null 
)

Member Function Documentation

NLPInterfacePack::NLPDirectThyraModelEvaluator::STANDARD_COMPOSITION_MEMBERS ( Thyra::DirectionalFiniteDiffCalculator< value_type >  ,
objDirecFiniteDiffCalculator   
)

Utility object that computes directional finite differences for objective.

NLPInterfacePack::NLPDirectThyraModelEvaluator::STANDARD_COMPOSITION_MEMBERS ( Thyra::DirectionalFiniteDiffCalculator< value_type >  ,
conDirecFiniteDiffCalculator   
)

Utility object that computes directional finite differences for constraints.

NLPInterfacePack::NLPDirectThyraModelEvaluator::STANDARD_MEMBER_COMPOSITION_MEMBERS ( bool  ,
DfDp_is_const   
)

Set if model.DfDp is constant or not.

void NLPInterfacePack::NLPDirectThyraModelEvaluator::initialize ( const Teuchos::RCP< Thyra::ModelEvaluator< value_type > > &  model,
const int  p_idx,
const int  g_idx,
const objDirecFiniteDiffCalculator_ptr_t  objDirecFiniteDiffCalculator = Teuchos::null,
const conDirecFiniteDiffCalculator_ptr_t  conDirecFiniteDiffCalculator = Teuchos::null 
)

.Initialize given a Thyra::ModelEvaluator and a description of how to interpret it.

ToDo: Finish documentation!

Definition at line 84 of file NLPInterfacePack_NLPDirectThyraModelEvaluator.cpp.

void NLPInterfacePack::NLPDirectThyraModelEvaluator::initialize ( bool  test_setup)
virtual
void NLPInterfacePack::NLPDirectThyraModelEvaluator::unset_quantities ( )
virtual
bool NLPInterfacePack::NLPDirectThyraModelEvaluator::supports_Gf ( ) const
virtual
bool NLPInterfacePack::NLPDirectThyraModelEvaluator::supports_Gf_prod ( ) const
virtual
value_type NLPInterfacePack::NLPDirectThyraModelEvaluator::calc_Gf_prod ( const Vector x,
const Vector d,
bool  newx 
) const
virtual
Range1D NLPInterfacePack::NLPDirectThyraModelEvaluator::var_dep ( ) const
virtual
Range1D NLPInterfacePack::NLPDirectThyraModelEvaluator::var_indep ( ) const
virtual
const NLPDirect::mat_fcty_ptr_t NLPInterfacePack::NLPDirectThyraModelEvaluator::factory_D ( ) const
virtual
const NLPDirect::mat_sym_nonsing_fcty_ptr_t NLPInterfacePack::NLPDirectThyraModelEvaluator::factory_S ( ) const
virtual
void NLPInterfacePack::NLPDirectThyraModelEvaluator::calc_point ( const Vector x,
value_type *  f,
VectorMutable c,
bool  recalc_c,
VectorMutable Gf,
VectorMutable py,
VectorMutable rGf,
MatrixOp *  GcU,
MatrixOp *  D,
MatrixOp *  Uz 
) const
virtual
void NLPInterfacePack::NLPDirectThyraModelEvaluator::calc_semi_newton_step ( const Vector x,
VectorMutable c,
bool  recalc_c,
VectorMutable py 
) const
virtual

Member Data Documentation

Teuchos::RCP<Thyra::LinearOpWithSolveBase<value_type> > NLPInterfacePack::NLPDirectThyraModelEvaluator::thyra_C_
mutableprivate
Teuchos::RCP<Thyra::MultiVectorBase<value_type> > NLPInterfacePack::NLPDirectThyraModelEvaluator::thyra_N_
mutableprivate

The documentation for this class was generated from the following files: