10#ifndef ROL_SEPARABLEOBJECTIVE_DEF_H
11#define ROL_SEPARABLEOBJECTIVE_DEF_H
15template<
typename Real>
19template<
typename Real>
21 ROL_TEST_FOR_EXCEPTION( (
size_ <= i ) , std::invalid_argument,
22 ">>> ERROR (ROL_SeparableObjective, get): "
23 "Dimension mismatch.");
27template<
typename Real>
30 ROL_TEST_FOR_EXCEPTION( (
size_ != xp.
numVectors() ) , std::invalid_argument,
31 ">>> ERROR (ROL_SeparableObjective, update): "
32 "Dimension mismatch.");
36template<
typename Real>
39 ROL_TEST_FOR_EXCEPTION( (
size_ != xp.
numVectors() ) , std::invalid_argument,
40 ">>> ERROR (ROL_SeparableObjective, update): "
41 "Dimension mismatch.");
45template<
typename Real>
48 ROL_TEST_FOR_EXCEPTION( (
size_ != xp.
numVectors() ) , std::invalid_argument,
49 ">>> ERROR (ROL_SeparableObjective, value): "
50 "Dimension mismatch.");
56template<
typename Real>
60 ROL_TEST_FOR_EXCEPTION( (
size_ != gp.
numVectors() ) , std::invalid_argument,
61 ">>> ERROR (ROL_SeparableObjective, gradient): "
62 "Dimension mismatch.");
63 ROL_TEST_FOR_EXCEPTION( (
size_ != xp.
numVectors() ) , std::invalid_argument,
64 ">>> ERROR (ROL_SeparableObjective, gradient): "
65 "Dimension mismatch.");
69template<
typename Real>
74 ROL_TEST_FOR_EXCEPTION( (
size_ != hvp.
numVectors() ) , std::invalid_argument,
75 ">>> ERROR (ROL_SeparableObjective, gradient): "
76 "Dimension mismatch.");
77 ROL_TEST_FOR_EXCEPTION( (
size_ != vp.
numVectors() ) , std::invalid_argument,
78 ">>> ERROR (ROL_SeparableObjective, hessVec): "
79 "Dimension mismatch.");
80 ROL_TEST_FOR_EXCEPTION( (
size_ != xp.
numVectors() ) , std::invalid_argument,
81 ">>> ERROR (ROL_SeparableObjective, hessVec): "
82 "Dimension mismatch.");
86template<
typename Real>
91 ROL_TEST_FOR_EXCEPTION( (
size_ != hvp.
numVectors() ) , std::invalid_argument,
92 ">>> ERROR (ROL_SeparableObjective, gradient): "
93 "Dimension mismatch.");
94 ROL_TEST_FOR_EXCEPTION( (
size_ != vp.
numVectors() ) , std::invalid_argument,
95 ">>> ERROR (ROL_SeparableObjective, hessVec): "
96 "Dimension mismatch.");
97 ROL_TEST_FOR_EXCEPTION( (
size_ != xp.
numVectors() ) , std::invalid_argument,
98 ">>> ERROR (ROL_SeparableObjective, hessVec): "
99 "Dimension mismatch.");
103template<
typename Real>
108 ROL_TEST_FOR_EXCEPTION( (
size_ != hvp.
numVectors() ) , std::invalid_argument,
109 ">>> ERROR (ROL_SeparableObjective, gradient): "
110 "Dimension mismatch.");
111 ROL_TEST_FOR_EXCEPTION( (
size_ != vp.
numVectors() ) , std::invalid_argument,
112 ">>> ERROR (ROL_SeparableObjective, hessVec): "
113 "Dimension mismatch.");
114 ROL_TEST_FOR_EXCEPTION( (
size_ != xp.
numVectors() ) , std::invalid_argument,
115 ">>> ERROR (ROL_SeparableObjective, hessVec): "
116 "Dimension mismatch.");
120template<
typename Real>
virtual void update(const Vector< Real > &u_old, const Vector< Real > &u_new, const Vector< Real > &z, bool flag=true, int iter=-1)
virtual void setParameter(const std::vector< Real > ¶m)
Defines the linear algebra of vector space on a generic partitioned vector.
ROL::Ptr< const Vector< Real > > get(size_type i) const
size_type numVectors() const
void update(const Vector< Real > &x, UpdateType type, int iter=-1) override
Real value(const Vector< Real > &x, Real &tol) override
void gradient(Vector< Real > &g, const Vector< Real > &x, Real &tol) override
const std::vector< Ptr< Objective< Real > > > obj_
void precond(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) override
void setParameter(const std::vector< Real > ¶m) override
SeparableObjective(const std::vector< Ptr< Objective< Real > > > &obj)
void hessVec(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) override
void invHessVec(Vector< Real > &hv, const Vector< Real > &v, const Vector< Real > &x, Real &tol) override
const Ptr< Objective< Real > > get(unsigned i) const
Defines the linear algebra or vector space interface.
void setParameter(ROL::ParameterList &parlist, const std::vector< std::string > &location, const std::vector< std::string >::iterator iter, ParameterType value)
ROL::Objective_SerialSimOpt Objective_SimOpt value(const V &u, const V &z, Real &tol) override