54 #include "Teuchos_GlobalMPISession.hpp"
59 int main(
int argc,
char *argv[]) {
67 Teuchos::GlobalMPISession mpiSession(&argc, &argv);
70 int iprint = argc - 1;
71 ROL::Ptr<std::ostream> outStream;
74 outStream = ROL::makePtrFromRef(std::cout);
76 outStream = ROL::makePtrFromRef(bhs);
80 oldFormatState.copyfmt(std::cout);
97 g = x->dual().clone();
100 obj->gradient(*g,*x,zero);
102 model = ROL::makePtr<ROL::ColemanLiModel<RealT>>(*obj,*con,*x,*g);
104 ROL::Ptr<V> s = x->clone();
105 ROL::Ptr<V> v = x->clone();
106 ROL::Ptr<V> u = x->clone();
112 model->checkGradient(*s,*v);
113 model->checkHessVec(*s,*v);
114 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