20 #include "Teuchos_GlobalMPISession.hpp"
25 int main(
int argc,
char *argv[]) {
32 Teuchos::GlobalMPISession mpiSession(&argc, &argv);
35 int iprint = argc - 1;
36 ROL::Ptr<std::ostream> outStream;
39 outStream = ROL::makePtrFromRef(std::cout);
41 outStream = ROL::makePtrFromRef(bhs);
45 oldFormatState.copyfmt(std::cout);
62 g = x->dual().clone();
65 obj->gradient(*g,*x,zero);
67 model = ROL::makePtr<ROL::ColemanLiModel<RealT>>(*obj,*con,*x,*g);
69 ROL::Ptr<V> s = x->clone();
70 ROL::Ptr<V> v = x->clone();
71 ROL::Ptr<V> u = x->clone();
77 model->checkGradient(*s,*v);
78 model->checkHessVec(*s,*v);
79 model->checkHessSym(*s,*u,*v);
Provides the interface to evaluate objective functions.
void RandomizeVector(Vector< Real > &x, const Real &lower=0.0, const Real &upper=1.0)
Fill a ROL::Vector with uniformly-distributed random numbers in the interval [lower,upper].
Ptr< Vector< Real > > getInitialGuess(void) const
Ptr< Objective< Real > > getObjective(void) const
Defines the linear algebra or vector space interface.
Defines a no-output stream class ROL::NullStream and a function makeStreamPtr which either wraps a re...
Objective_SerialSimOpt(const Ptr< Obj > &obj, const V &ui) z0_ zero()
Ptr< Vector< Real > > getSolution(const int i=0) const
Provides the interface to apply upper and lower bound constraints.
basic_nullstream< char, char_traits< char >> nullstream
int main(int argc, char *argv[])
Contains definitions for W. Hock and K. Schittkowski 2nd test function.
Ptr< BoundConstraint< Real > > getBoundConstraint(void) const