diff --git a/src/samplefunctional.hh b/src/samplefunctional.hh index a6a2d55383b4586d5bbb85cd44d8cf922edf95ff..70d92c71f01a7353e9cb26405e0d4f26942252da 100644 --- a/src/samplefunctional.hh +++ b/src/samplefunctional.hh @@ -174,8 +174,19 @@ void minimise(Functional const J, typename Functional::SmallVector &x, 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 + /* + It is possible that this differs quite a lot from the + directional derivative computed in the descentDirection() + method: + + If phi is nonsmooth at x, so that the directional + derivatives jump, and |x| is computed to be too small or too + large globally or locally, the locally computed + subdifferential and the globally computed subdifferential + will no longer coincide! + + The assertion D[1] <= 0 may thus fail. + */ } int count;