diff --git a/src/averagedistanceassembler.hh b/src/averagedistanceassembler.hh index af96d91f69a82f130a1c847abfac185eb1ca0620..56271d4dcc20169af73d28e9f6346c6042fda8d0 100644 --- a/src/averagedistanceassembler.hh +++ b/src/averagedistanceassembler.hh @@ -33,16 +33,9 @@ public: typename TargetSpace::EmbeddedTangentVector& gradient) const { gradient = 0; -#if 0 // This old code uses the derivative of dist(,), which is (frequently, at least) - // not differentiable at 0 - for (size_t i=0; i<coefficients_.size(); i++) - gradient.axpy(weights_[i]*TargetSpace::distance(coefficients_[i], x), - TargetSpace::derivativeOfDistanceWRTSecondArgument(coefficients_[i], x)); -#else for (size_t i=0; i<coefficients_.size(); i++) gradient.axpy(0.5*weights_[i], TargetSpace::derivativeOfDistanceSquaredWRTSecondArgument(coefficients_[i], x)); -#endif } void assembleHessianApproximation(const TargetSpace& x,