44 #pragma warning(disable : 985)
66 const VectorSpace& vec_space
70 ,std::ostream* console_out
71 ,std::ostream* error_out
72 ,
bool throw_solve_exception
73 ,std::ostream* algo_out
74 ,std::ostream* summary_out
75 ,std::ostream* journal_out
80 namespace rcp = MemMngPack;
82 namespace ofsp = OptionsFromStreamPack;
83 using ofsp::OptionsFromStream;
84 namespace rsqp = MoochoPack;
85 using rsqp::MoochoSolver;
86 using rsqp::NLPAlgoConfigMamaJama;
88 MoochoSolver::ESolutionStatus
89 solve_return = MoochoSolver::SOLVE_RETURN_EXCEPTION;
95 << std::setprecision(prec)
97 <<
"*************************************************\n"
98 <<
"*** Running Tests on ExampleNLPFirstOrder ***\n"
99 <<
"*************************************************\n"
100 <<
"\nUsing a vector space of type \'" <<
typeName(vec_space) <<
"\'"
101 <<
"\nwith a dimension of vec_space.dim() = " << vec_space.dim()
106 nlp(VectorSpace::space_ptr_t(&vec_space,
false),xo,has_bounds,dep_bounded);
112 solver.set_error_handling(
113 throw_solve_exception
116 solver.set_console_out(
Teuchos::rcp(console_out,
false));
117 solver.set_summary_out(
Teuchos::rcp(summary_out,
false));
118 solver.set_journal_out(
Teuchos::rcp(journal_out,
false));
122 solve_return = solver.solve_nlp();
MoochoPack::MoochoSolver::ESolutionStatus ExampleNLPFirstOrderRun(const VectorSpace &vec_space, value_type xo, bool has_bounds, bool dep_bounded, std::ostream *console_out, std::ostream *error_out, bool throw_solve_exception=false, std::ostream *algo_out=NULL, std::ostream *summary_out=NULL, std::ostream *journal_out=NULL)
Function accepts a VectorSpace object and then uses it to define an example NLP and run MoochoPack::M...
std::string typeName(const T &t)
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Simple example NLP subclass to illustrate how to implement the NLPFirstOrder interface for a speciali...
AbstractLinAlgPack::value_type value_type