60 namespace MoochoPack {
71 extern const std::string
x_name;
72 extern const std::string
f_name;
73 extern const std::string
Gf_name;
74 extern const std::string
HL_name;
75 extern const std::string
c_name;
76 extern const std::string
h_name;
77 extern const std::string
Gc_name;
79 extern const std::string
Y_name;
80 extern const std::string
Z_name;
81 extern const std::string
R_name;
82 extern const std::string
Uy_name;
83 extern const std::string
Uz_name;
85 extern const std::string
py_name;
87 extern const std::string
pz_name;
89 extern const std::string
d_name;
93 extern const std::string
w_name;
100 extern const std::string
mu_name;
106 extern const std::string
GL_name;
109 extern const std::string
nu_name;
126 #define STATE_IQ_DECL(TYPE,NAME) \
127 virtual IterQuantityAccess<TYPE>& NAME(); \
128 virtual const IterQuantityAccess<TYPE>& NAME() const; \
130 iq_id_encap NAME ## _iq_id_; \
135 #define STATE_INDEX_IQ_DECL(NAME) \
136 STATE_IQ_DECL(index_type,NAME) \
140 #define STATE_SCALAR_IQ_DECL(NAME) \
141 STATE_IQ_DECL(value_type,NAME) \
145 #define STATE_VECTOR_IQ_DECL(NAME) \
146 STATE_IQ_DECL(VectorMutable,NAME) \
155 #define STATE_IQ_DEF(CLASS,TYPE,NAME,NAME_STR) \
156 IterQuantityAccess<TYPE>& \
159 update_iq_id( NAME_STR, &NAME ## _iq_id_ ); \
160 return IterationPack::cast_iq<TYPE>( \
161 *this, NAME ## _iq_id_.iq_id, NAME_STR ); \
163 const IterQuantityAccess<TYPE>& \
164 CLASS::NAME() const \
166 return const_cast<CLASS*>(this)->NAME(); \
173 #define STATE_INDEX_IQ_DEF(CLASS,NAME,NAME_STR) \
174 IterQuantityAccess<index_type>& \
177 update_index_type_iq_id( NAME_STR, &NAME ## _iq_id_ ); \
178 return IterationPack::cast_iq<index_type>( \
179 *this, NAME ## _iq_id_.iq_id, NAME_STR ); \
181 const IterQuantityAccess<index_type>& \
182 CLASS::NAME() const \
184 return const_cast<CLASS*>(this)->NAME(); \
191 #define STATE_SCALAR_IQ_DEF(CLASS,NAME,NAME_STR) \
192 IterQuantityAccess<value_type>& \
195 update_value_type_iq_id( NAME_STR, &NAME ## _iq_id_ ); \
196 return IterationPack::cast_iq<value_type>( \
197 *this, NAME ## _iq_id_.iq_id, NAME_STR ); \
199 const IterQuantityAccess<value_type>& \
200 CLASS::NAME() const \
202 return const_cast<CLASS*>(this)->NAME(); \
214 #define STATE_VECTOR_IQ_DEF(CLASS,NAME,NAME_STR,VEC_SPC,VEC_RN) \
215 IterQuantityAccess<VectorMutable>& \
218 update_vector_iq_id( NAME_STR, VEC_SPC, VEC_RN, &NAME ## _iq_id_ ); \
219 return IterationPack::cast_iq<VectorMutable>( \
220 *this, NAME ## _iq_id_.iq_id, NAME_STR ); \
222 const IterQuantityAccess<VectorMutable>& \
223 CLASS::NAME() const \
225 return const_cast<CLASS*>(this)->NAME(); \
274 {
public:
InvalidType(
const std::string& what_arg) : std::logic_error(what_arg) {}};
501 const std::string& iq_name
506 const std::string& iq_name
511 const std::string& iq_name
516 const std::string& iq_name
517 ,
const VectorSpace::space_ptr_t& vec_space
582 #endif // RSQP_STATE_H
vec_space_ptr_t space_null_
f_dbl_prec const f_int f_dbl_prec * Y
iq_vector_list_t vector_iqs_lists_[NUM_VEC_SPACE_TYPES]
void update_iq_id(const std::string &iq_name, iq_id_encap *iq_id) const
const std::string opt_kkt_err_name
#define STATE_IQ_DECL(TYPE, NAME)
Add class declarations for an arbitrary iteration quantity.
const std::string lambda_name
const VectorSpace & space_null() const
const std::string GL_name
const std::string eta_name
const std::string feas_kkt_err_name
const std::string alpha_name
std::deque< iq_id_type > iq_vector_list_t
const std::string zeta_name
const std::string Ypy_name
const std::string rGL_name
#define STATE_SCALAR_IQ_DECL(NAME)
Add class declarations for a scalar (i.e. value_type) iteration quantity.
const std::string Gc_name
vec_space_ptr_t space_range_
const std::string num_basis_name
const VectorSpace & space_range() const
void update_vector_iq_id(const std::string &iq_name, const VectorSpace::space_ptr_t &vec_space, EVecSpaceType vec_space_type, iq_id_encap *iq_id)
const std::string Gf_name
const std::string Zpz_name
const std::string merit_func_nlp_name
const f_int f_dbl_prec const f_int f_int const f_int f_int const f_dbl_prec f_int f_int f_dbl_prec w[]
const std::string phi_name
InvalidType(const std::string &what_arg)
void update_value_type_iq_id(const std::string &iq_name, iq_id_encap *iq_id)
const std::string pz_name
const std::string comp_kkt_err_name
Reduced space SQP state encapsulation interface.
const std::string rGf_name
Abstacts a set of iteration quantities for an iterative algorithm.
STANDARD_COMPOSITION_MEMBERS(DecompositionSystem, decomp_sys)
Set the DecompositionSystem object that all share.
Teuchos::RCP< const VectorSpace > vec_space_ptr_t
#define STATE_INDEX_IQ_DECL(NAME)
Add class declarations for an index (i.e. index_type) iteration quantity.
void update_vector_factories(EVecSpaceType vec_space_type, const vec_space_ptr_t &vec_space)
Thrown if an iteration quantity is of an invalid type.
const std::string mu_name
const std::string py_name
const std::string rHL_name
void set_space_null(const vec_space_ptr_t &space_null)
Set the VectorSpace of the null space (pz).
const std::string HL_name
const std::string qp_grad_name
const std::string Uy_name
NLPAlgoState & operator=(const NLPAlgoState &)
void update_index_type_iq_id(const std::string &iq_name, iq_id_encap *iq_id)
vec_space_ptr_t & get_space_range()
NLPAlgoState(const decomp_sys_ptr_t &decomp_sys=Teuchos::null, const vec_space_ptr_t &space_x=Teuchos::null, const vec_space_ptr_t &space_c=Teuchos::null, const vec_space_ptr_t &space_range=Teuchos::null, const vec_space_ptr_t &space_null=Teuchos::null)
Construct.
const std::string nu_name
const std::string Uz_name
STANDARD_CONST_COMPOSITION_MEMBERS(VectorSpace, space_x)
Set the VectorSpace of x.
vec_space_ptr_t & get_space_null()
STANDARD_MEMBER_COMPOSITION_MEMBERS(Range1D, var_dep)
Range of dependent variables [1,r].
RangePack::Range1D Range1D
void set_space_range(const vec_space_ptr_t &space_range)
Set the VectorSpace of the range space (py).
#define STATE_VECTOR_IQ_DECL(NAME)
Add class declarations for a VectorMutable iteration quantity.