61 const VectorSpace& vec_space
65 ,std::ostream* console_out
66 ,std::ostream* error_out
67 ,
bool throw_solve_exception
68 ,std::ostream* algo_out
69 ,std::ostream* summary_out
70 ,std::ostream* journal_out
75 namespace rcp = MemMngPack;
77 namespace ofsp = OptionsFromStreamPack;
78 using ofsp::OptionsFromStream;
79 namespace rsqp = MoochoPack;
80 using rsqp::MoochoSolver;
81 using rsqp::NLPAlgoConfigMamaJama;
83 MoochoSolver::ESolutionStatus
84 solve_return = MoochoSolver::SOLVE_RETURN_EXCEPTION;
93 << std::setprecision(prec)
95 <<
"***************************************************\n"
96 <<
"*** Running Tests on ExampleNLPDirect ***\n"
97 <<
"***************************************************\n"
98 <<
"\nUsing a vector space of type \'" <<
typeName(vec_space) <<
"\'"
99 <<
"\nwith a dimension of vec_space.dim() = " << vec_space.dim()
104 nlp(VectorSpace::space_ptr_t(&vec_space,
false),xo,has_bounds,dep_bounded);
109 solver.set_error_handling(
110 throw_solve_exception
113 solver.set_console_out(
Teuchos::rcp(console_out,
false));
114 solver.set_summary_out(
Teuchos::rcp(summary_out,
false));
115 solver.set_journal_out(
Teuchos::rcp(journal_out,
false));
119 solve_return = solver.solve_nlp();
MoochoPack::MoochoSolver::ESolutionStatus ExampleNLPDirectRun(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)
const f_int f_dbl_prec const f_int f_int const f_int f_int const f_dbl_prec f_int f_int f_dbl_prec w[]
AbstractLinAlgPack::value_type value_type
Simple example NLP subclass to illustrate how to implement the NLPDirect interface for a specialized ...