42 #ifndef LINE_SEARCH_FILTER_STEP_H 43 #define LINE_SEARCH_FILTER_STEP_H 47 #include "MoochoPack_Types.hpp" 48 #include "IterationPack_AlgorithmStep.hpp" 49 #include "IterationPack_CastIQMember.hpp" 50 #include "Teuchos_StandardCompositionMacros.hpp" 51 #include "Teuchos_StandardMemberCompositionMacros.hpp" 53 #include "IterationPack_AlgorithmState.hpp" 61 FilterEntry( value_type new_f, value_type new_theta,
int new_iter)
62 : f(new_f), theta(new_theta), iter(new_iter) {}
71 typedef std::list< FilterEntry > Filter_T;
73 const std::string FILTER_IQ_STRING =
"LS_FilterEntries";
99 STANDARD_MEMBER_COMPOSITION_MEMBERS( value_type, gamma_theta );
105 STANDARD_MEMBER_COMPOSITION_MEMBERS( value_type, gamma_f );
113 STANDARD_MEMBER_COMPOSITION_MEMBERS( value_type, f_min );
119 STANDARD_MEMBER_COMPOSITION_MEMBERS( value_type, gamma_alpha );
125 STANDARD_MEMBER_COMPOSITION_MEMBERS( value_type, delta );
131 STANDARD_MEMBER_COMPOSITION_MEMBERS( value_type, s_f );
137 STANDARD_MEMBER_COMPOSITION_MEMBERS( value_type, s_theta );
144 STANDARD_MEMBER_COMPOSITION_MEMBERS( value_type, theta_small_fact );
150 STANDARD_MEMBER_COMPOSITION_MEMBERS( value_type, theta_max );
156 STANDARD_MEMBER_COMPOSITION_MEMBERS( value_type, eta_f );
162 STANDARD_MEMBER_COMPOSITION_MEMBERS( value_type, back_track_frac );
167 Teuchos::RCP<NLPInterfacePack::NLP> nlp
168 ,
const std::string obj_iq_name =
"f" 169 ,
const std::string grad_obj_iq_name =
"Gf" 170 ,
const value_type &gamma_theta = 1e-5
171 ,
const value_type &gamma_f = 1e-5
172 ,
const value_type &f_min = F_MIN_UNBOUNDED
173 ,
const value_type &gamma_alpha = 5e-2
174 ,
const value_type &delta = 1e-4
175 ,
const value_type &s_theta = 1.1
176 ,
const value_type &s_f = 2.3
177 ,
const value_type &theta_small_fact = 1e-4
178 ,
const value_type &theta_max = 1e10
179 ,
const value_type &eta_f = 1e-4
180 ,
const value_type &back_track_frac = 0.5
195 IterationPack::EDoStepType type,
199 IterationPack::EDoStepType type,
200 poss_type assoc_step_poss, std::ostream& out,
201 const std::string& leading_str )
const;
210 CastIQMember<Filter_T> filter_;
213 CastIQMember<value_type> obj_f_;
216 CastIQMember<VectorMutable> grad_obj_f_;
219 Teuchos::RCP<NLPInterfacePack::NLP> nlp_;
226 const IterQuantityAccess<VectorMutable>& x,
227 const IterQuantityAccess<value_type>& f,
228 const IterQuantityAccess<VectorMutable>* c,
229 const IterQuantityAccess<VectorMutable>* h,
230 const bool throw_excpt
234 bool CheckFilterAcceptability(
236 const value_type theta,
237 const AlgorithmState& s
242 const value_type Gf_t_dk,
243 const value_type alpha_k,
244 const IterQuantityAccess<value_type>& f_iq
248 bool CheckFractionalReduction(
249 const IterQuantityAccess<value_type>& f_iq,
250 const value_type gamma_f_used,
251 const value_type theta_kp1,
252 const value_type theta_k
257 const VectorMutable& d,
259 IterQuantityAccess<VectorMutable>& x,
260 IterQuantityAccess<value_type>& f,
261 IterQuantityAccess<VectorMutable>* c,
262 IterQuantityAccess<VectorMutable>* h,
267 value_type CalculateAlphaMin(
268 const value_type gamma_f_used,
269 const value_type Gf_t_dk,
270 const value_type theta_k,
271 const value_type theta_small
275 value_type CalculateTheta_k(
276 const IterQuantityAccess<VectorMutable>* c,
277 const IterQuantityAccess<VectorMutable>* h,
282 value_type CalculateGammaFUsed(
283 const IterQuantityAccess<value_type> &f,
284 const value_type theta_k,
285 const EJournalOutputLevel olevel,
290 bool ShouldSwitchToArmijo(
291 const value_type Gf_t_dk,
292 const value_type alpha_k,
293 const value_type theta_k,
294 const value_type theta_small
303 const value_type gamma_f_used,
304 const value_type f_with_boundary,
305 const value_type theta_with_boundary,
307 const EJournalOutputLevel olevel,
315 #endif // LINE_SEARCH_FILTER_STEP_H
static value_type F_MIN_UNBOUNDED
Filter line-search step class.