diff --git a/src/samplefunctional.hh b/src/samplefunctional.hh index 1e01e90cc7565756954156482049117e91e601b7..211ebf71d257c5bc1f895cc86cad4c98fbbd9599 100644 --- a/src/samplefunctional.hh +++ b/src/samplefunctional.hh @@ -53,14 +53,19 @@ class SampleFunctional { return; } else if (pg * x >= 0 && mg * x >= 0) { ret = pg; - Dune::dverb << "## Expected directional derivative: " << -(pg * mg) + Dune::dverb << "## Directional derivative (as per scalar product w/ " + "semigradient): " << -(ret * mg) << " (coordinates of the restriction)" << std::endl; } else if (pg * x <= 0 && mg * x <= 0) { ret = mg; - Dune::dverb << "## Expected directional derivative: " << -(mg * pg) + Dune::dverb << "## Directional derivative (as per scalar product w/ " + "semigradient): " << -(ret * pg) << " (coordinates of the restriction)" << std::endl; } else { ret = project(smoothGradient(x), x); + Dune::dverb << "## Directional derivative (as per scalar product w/ " + "semigradient): " << -(ret * ret) + << " (coordinates of the restriction)" << std::endl; } ret *= -1; } @@ -138,8 +143,9 @@ void minimise(const Functional J, const typename Functional::SmallVector x, { // Debug Interval<double> D; JRest.subDiff(0, D); - Dune::dverb << "## Descent according to JRest.subDiff: " << D[1] - << std::endl; + Dune::dverb + << "## Directional derivative (as per subdifferential of restriction): " + << D[1] << " (coordinates of the restriction)" << std::endl; assert(D[1] <= 0); // We should not be minimising in this direction otherwise }