44#ifndef ROL_SOLVER_DEF_HPP
45#define ROL_SOLVER_DEF_HPP
49template<
typename Real>
51 ParameterList &parlist )
59 ROL_TEST_FOR_EXCEPTION(
true,std::invalid_argument,
60 "Error in Solver::solve() : Unsupported problem type");
64template<
typename Real>
68 return solve(bhs,status,combineStatus);
71template<
typename Real>
74 bool combineStatus ) {
77 if (status != nullPtr)
algoU_->setStatusTest(status,combineStatus);
81 if (status != nullPtr)
algoB_->setStatusTest(status,combineStatus);
85 if (status != nullPtr)
algoE_->setStatusTest(status,combineStatus);
89 if (status != nullPtr)
algoG_->setStatusTest(status,combineStatus);
93 ROL_TEST_FOR_EXCEPTION(
true,std::invalid_argument,
94 "Error in Solver::solve() : Unsupported problem type");
103template<
typename Real>
113 ROL_TEST_FOR_EXCEPTION(
true,std::invalid_argument,
114 "Error in Solver::getAlgorithmState() : Unsupported problem type");
118template<
typename Real>
127 ROL_TEST_FOR_EXCEPTION(
true,std::invalid_argument,
128 "Error in Solver::reset() : Unsupported problem type");
Solver(const Ptr< Problem< Real > > &opt, ParameterList &list)
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< TypeU::Algorithm< Real > > algoU_
Provides an interface to check status of optimization algorithms.
Ptr< Algorithm< Real > > AlgorithmFactory(ParameterList &parlist)
Ptr< TypeE::Algorithm< Real > > AlgorithmFactory(ParameterList &parlist)
Ptr< TypeG::Algorithm< Real > > AlgorithmFactory(ParameterList &parlist)
Ptr< Algorithm< Real > > AlgorithmFactory(ParameterList &parlist)
basic_nullstream< char, char_traits< char > > nullstream
virtual void solve(Vector< Real > &c, Vector< Real > &u, const Vector< Real > &z) override