Commit 323aea63 authored by Thibault Lejemble's avatar Thibault Lejemble

fix bug in DistWeightFunc 2nd order scale derivative calculation

parent 40144aa9
......@@ -112,7 +112,7 @@ public:
\nabla w(\frac{\left|\mathbf{q}\right|}{t}) +
\left(\frac{\delta \frac{\left|\mathbf{q}\right|}{t}}{\delta t}\right)^2
\nabla^2 w(\frac{\left|\mathbf{q}\right|}{t}) =
\frac{2\left|\mathbf{q}\right|}{t^3} \nabla{w(\frac{\left|\mathbf{q}\right|}{t})} -
\frac{2\left|\mathbf{q}\right|}{t^3} \nabla{w(\frac{\left|\mathbf{q}\right|}{t})} +
\frac{\left|\mathbf{q}\right|^2}{t^4} \nabla^2{w(\frac{\left|\mathbf{q}\right|}{t})}
\f$
......
......@@ -58,7 +58,7 @@ DistWeightFunc<DataPoint, WeightKernel>::scaled2w( const VectorType& _q,
const DataPoint&) const
{
Scalar d = _q.norm();
return (d <= m_t) ? Scalar(Scalar(2.)*d/(m_t*m_t*m_t)*m_wk.df(d/m_t) -
return (d <= m_t) ? Scalar(Scalar(2.)*d/(m_t*m_t*m_t)*m_wk.df(d/m_t) +
d*d/(m_t*m_t*m_t*m_t)*m_wk.ddf(d/m_t)) :
Scalar(0.);
}
......
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