if (debug_output)
deallog << "Bracketing phase: " << i << std::endl
- << ai << " " << fi << " " << gi << std::endl;
+ << ai << " " << fi << " " << gi << " " << w1(ai, fi) << " "
+ << w2(gi) << " " << f_min << std::endl;
// first check if we can stop bracketing or the whole line search:
if (fi <= f_min || ai == a_max)
- return std::make_pair(ai, i);
+ {
+ if (debug_output)
+ deallog << "Reached the maximum step size." << std::endl;
+ return std::make_pair(ai, i);
+ }
if (!w1(ai, fi) ||
(fi >= f_prev && i > 1)) // violate first Wolfe or not descending
if (w2(gi)) // satisfies both Wolfe conditions
{
+ if (debug_output)
+ deallog << "Satisfied both Wolfe conditions during Bracketing."
+ << std::endl;
+
Assert(w1(ai, fi), ExcInternalError());
return std::make_pair(ai, i);
}
if (debug_output)
deallog << "Sectioning phase: " << i << std::endl
- << a_lo << " " << f_lo << " " << g_lo << std::endl
- << a_hi << " " << f_hi << " " << g_hi << std::endl
- << ai << " " << fi << " " << gi << std::endl;
+ << a_lo << " " << f_lo << " " << g_lo << " " << w1(a_lo, f_lo)
+ << " " << w2(g_lo) << std::endl
+ << a_hi << " " << f_hi << " " << g_hi << " " << w1(a_hi, f_hi)
+ << " " << w2(g_hi) << std::endl
+ << ai << " " << fi << " " << gi << " " << w1(ai, fi) << " "
+ << w2(gi) << std::endl;
if (!w1(ai, fi) || fi >= f_lo)
// take [a_lo, ai]
{
if (w2(gi)) // satisfies both wolf
{
+ if (debug_output)
+ deallog << "Satisfied both Wolfe conditions." << std::endl;
Assert(w1(ai, fi), ExcInternalError());
return std::make_pair(ai, i);
}
DEAL::Bracketing phase: 1
-DEAL::0.100000 0.820000 -1.40000
+DEAL::0.100000 0.820000 -1.40000 1 0 -1.00000
DEAL::Bracketing phase: 2
-DEAL::1.00000 100.000 400.000
+DEAL::1.00000 100.000 400.000 0 0 -1.00000
DEAL::Sectioning phase: 3
-DEAL::0.100000 0.820000 -1.40000
-DEAL::1.00000 100.000 400.000
-DEAL::0.333333 1.67901 13.4815
+DEAL::0.100000 0.820000 -1.40000 1 0
+DEAL::1.00000 100.000 400.000 0 0
+DEAL::0.333333 1.67901 13.4815 0 0
DEAL::Sectioning phase: 4
-DEAL::0.100000 0.820000 -1.40000
-DEAL::0.333333 1.67901 13.4815
-DEAL::0.167641 0.771802 0.219785
+DEAL::0.100000 0.820000 -1.40000 1 0
+DEAL::0.333333 1.67901 13.4815 0 0
+DEAL::0.167641 0.771802 0.219785 1 0
DEAL::Sectioning phase: 5
-DEAL::0.167641 0.771802 0.219785
-DEAL::0.100000 0.820000 -1.40000
-DEAL::0.159668 0.771152 -0.0524435
+DEAL::0.167641 0.771802 0.219785 1 0
+DEAL::0.100000 0.820000 -1.40000 1 0
+DEAL::0.159668 0.771152 -0.0524435 1 1
+DEAL::Satisfied both Wolfe conditions.
DEAL::Solution: 0.159668
DEAL::Distance: 0.00159407
DEAL::Case 1:
DEAL::Bracketing phase: 1
-DEAL::13.0000 -0.618070 -0.0128665
+DEAL::13.0000 -0.618070 -0.0128665 1 1 -1.14750
+DEAL::Satisfied both Wolfe conditions during Bracketing.
DEAL::Solution: 13.0000
DEAL::Distance: 11.5255
DEAL::Case 2:
DEAL::Bracketing phase: 1
-DEAL::0.100000 -0.152254 -1.50769
+DEAL::0.100000 -0.152254 -1.50769 1 0 -1.14750
DEAL::Bracketing phase: 2
-DEAL::1.00000 -1.03000 -0.363333
+DEAL::1.00000 -1.03000 -0.363333 1 0 -1.14750
DEAL::Bracketing phase: 3
-DEAL::9.10000 -0.594896 0.00370484
+DEAL::9.10000 -0.594896 0.00370484 1 1 -1.14750
DEAL::Sectioning phase: 4
-DEAL::1.00000 -1.03000 -0.363333
-DEAL::9.10000 -0.594896 0.00370484
-DEAL::3.09290 -0.895024 0.139676
+DEAL::1.00000 -1.03000 -0.363333 1 0
+DEAL::9.10000 -0.594896 0.00370484 1 1
+DEAL::3.09290 -0.895024 0.139676 1 1
DEAL::Sectioning phase: 5
-DEAL::1.00000 -1.03000 -0.363333
-DEAL::3.09290 -0.895024 0.139676
-DEAL::1.60613 -1.10031 0.0529144
+DEAL::1.00000 -1.03000 -0.363333 1 0
+DEAL::3.09290 -0.895024 0.139676 1 1
+DEAL::1.60613 -1.10031 0.0529144 1 1
+DEAL::Satisfied both Wolfe conditions.
DEAL::Solution: 1.60613
DEAL::Distance: 0.131601
DEAL::Case 3:
DEAL::Bracketing phase: 1
-DEAL::1.00000 -1.03000 -0.363333
+DEAL::1.00000 -1.03000 -0.363333 1 0 -1.14750
DEAL::Bracketing phase: 2
-DEAL::10.0000 -0.594118 -0.00174164
+DEAL::10.0000 -0.594118 -0.00174164 1 1 -1.14750
DEAL::Sectioning phase: 3
-DEAL::1.00000 -1.03000 -0.363333
-DEAL::10.0000 -0.594118 -0.00174164
-DEAL::3.36365 -0.858821 0.127629
+DEAL::1.00000 -1.03000 -0.363333 1 0
+DEAL::10.0000 -0.594118 -0.00174164 1 1
+DEAL::3.36365 -0.858821 0.127629 1 1
DEAL::Sectioning phase: 4
-DEAL::1.00000 -1.03000 -0.363333
-DEAL::3.36365 -0.858821 0.127629
-DEAL::1.65166 -1.09756 0.0676998
+DEAL::1.00000 -1.03000 -0.363333 1 0
+DEAL::3.36365 -0.858821 0.127629 1 1
+DEAL::1.65166 -1.09756 0.0676998 1 1
+DEAL::Satisfied both Wolfe conditions.
DEAL::Solution: 1.65166
DEAL::Distance: 0.177131