|
Wildmeshing Toolkit
|
The true w * d^2 to the exact piecewise-linear input with its TRUE Hessian. More...
#include <EnvelopeEnergy.hpp>
Public Member Functions | |
| ExactDistanceEnergy2D (const std::shared_ptr< SampleEnvelope > &envelope, const double weight=1) | |
| double | value (const TVector &x) override |
| void | gradient (const TVector &x, TVector &gradv) override |
| void | hessian (const TVector &x, THessian &hessian) override |
| void | hessian (const TVector &x, MatrixXd &hessian) override |
| void | solution_changed (const TVector &new_x) override |
Private Attributes | |
| std::shared_ptr< SampleEnvelope > | m_envelope |
| double | m_weight |
The true w * d^2 to the exact piecewise-linear input with its TRUE Hessian.
Within each closest-feature region the distance to a PL input is exactly quadratic, so the true Hessian is computable and cheap: 2w n n^T over a segment interior (n the segment normal), 2w I at a polyline corner. Value and gradient are the true distance and its true gradient, re-queried fresh at every evaluation; unlike the Gauss-Newton model, all three callbacks agree under finite differences everywhere off a region boundary.
Behaviorally, the geometry decides where sliding is free: segment interiors slide, corners hold isotropically.