10#ifndef ROL_SOLVER_DEF_HPP
11#define ROL_SOLVER_DEF_HPP
15template<
typename Real>
17 ParameterList &parlist,
27 ROL_TEST_FOR_EXCEPTION(
true,std::invalid_argument,
28 "Error in Solver::solve() : Unsupported problem type");
32template<
typename Real>
36 return solve(bhs,status,combineStatus);
39template<
typename Real>
42 bool combineStatus ) {
45 if (status != nullPtr)
algoU_->setStatusTest(status,combineStatus);
49 if (status != nullPtr)
algoP_->setStatusTest(status,combineStatus);
53 if (status != nullPtr)
algoB_->setStatusTest(status,combineStatus);
57 if (status != nullPtr)
algoE_->setStatusTest(status,combineStatus);
61 if (status != nullPtr)
algoG_->setStatusTest(status,combineStatus);
65 ROL_TEST_FOR_EXCEPTION(
true,std::invalid_argument,
66 "Error in Solver::solve() : Unsupported problem type");
75template<
typename Real>
86 ROL_TEST_FOR_EXCEPTION(
true,std::invalid_argument,
87 "Error in Solver::getAlgorithmState() : Unsupported problem type");
91template<
typename Real>
101 ROL_TEST_FOR_EXCEPTION(
true,std::invalid_argument,
102 "Error in Solver::reset() : Unsupported problem type");
virtual void solve(Vector< Real > &c, Vector< Real > &u, const Vector< Real > &z) override
Provides interface for and implements limited-memory secant operators.
Solver(const Ptr< Problem< Real > > &opt, ParameterList &list, const Ptr< Secant< Real > > &secant=nullPtr)
Constructor.
Ptr< TypeG::Algorithm< Real > > algoG_
void reset()
Reset both Algorithm and Step.
Ptr< TypeB::Algorithm< Real > > algoB_
Ptr< TypeE::Algorithm< Real > > algoE_
const Ptr< Problem< Real > > opt_
Ptr< const AlgorithmState< Real > > getAlgorithmState() const
Return the AlgorithmState.
int solve(const Ptr< StatusTest< Real > > &status=nullPtr, bool combineStatus=true)
Solve optimization problem with no iteration output.
const EProblem problemType_
Ptr< TypeP::Algorithm< Real > > algoP_
Ptr< TypeU::Algorithm< Real > > algoU_
Provides an interface to check status of optimization algorithms.
Ptr< Algorithm< Real > > AlgorithmFactory(ParameterList &parlist, const Ptr< Secant< Real > > &secant=nullPtr)
Ptr< TypeE::Algorithm< Real > > AlgorithmFactory(ParameterList &parlist, const Ptr< Secant< Real > > &secant=nullPtr)
Ptr< TypeG::Algorithm< Real > > AlgorithmFactory(ParameterList &parlist, const Ptr< Secant< Real > > &secant=nullPtr)
Ptr< Algorithm< Real > > AlgorithmFactory(ParameterList &parlist, const Ptr< Secant< Real > > &secant=nullPtr)
Ptr< Algorithm< Real > > AlgorithmFactory(ParameterList &parlist, const Ptr< Secant< Real > > &secant=nullPtr)
basic_nullstream< char, std::char_traits< char > > nullstream