Commit 40144aa9 authored by Thibault Lejemble's avatar Thibault Lejemble

fix bug in DistWeightFunc 2nd order spatial derivative calculation

parent 5a3200be
......@@ -36,7 +36,7 @@ DistWeightFunc<DataPoint, WeightKernel>::spaced2w( const VectorType& _q,
if (d <= m_t && d != Scalar(0.))
{
Scalar der = m_wk.df(d/m_t);
result = _q*_q.transpose()*(m_wk.ddf(d/m_t)/m_t - der/(d*d));
result = _q*_q.transpose()/d*(m_wk.ddf(d/m_t)/m_t - der/d);
result.diagonal().array() += der;
result *= Scalar(1.)/(m_t*d);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment