Commit aaba1bc3 authored by Thibault Lejemble's avatar Thibault Lejemble

second order space derivative of weighting function

parent 673d04e6
......@@ -31,6 +31,8 @@ public:
typedef typename DataPoint::Scalar Scalar;
/*! \brief Vector type from DataPoint */
typedef typename DataPoint::VectorType VectorType;
/*! \brief Matrix type from DataPoint */
typedef typename DataPoint::MatrixType MatrixType;
\brief Constructor that defines the current evaluation scale
......@@ -71,6 +73,25 @@ public:
const DataPoint& /*attributes*/) const;
\brief Second order derivative in space (for each spatial dimension \f$\mathsf{x})\f$
\f$ \frac{\delta^2 \frac{\left|\mathbf{q}_\mathsf{x}\right|}{t}}{\delta \mathsf{x}^2}
\nabla w(\frac{\left|\mathbf{q}_\mathsf{x}\right|}{t}) +
\left(\frac{\delta \frac{\left|\mathbf{q}_\mathsf{x}\right|}{t}}{\delta \mathsf{x}}\right)^2
\nabla^2 w(\frac{\left|\mathbf{q}_\mathsf{x}\right|}{t}) =
\frac{1}{t\left|\mathbf{q}_\mathsf{x}\right|} \left( I_d - \frac{\mathbf{q}_\mathsf{x}\mathbf{q}_\mathsf{x}^T}{\left|\mathbf{q}_\mathsf{x}\right|^2}\right)
\nabla w(\frac{\left|\mathbf{q}_\mathsf{x}\right|}{t}) +
\nabla^2 w(\frac{\left|\mathbf{q}_\mathsf{x}\right|}{t}) \f$
where \f$ \left|\mathbf{q}_\mathsf{x}\right| \f$ represents the norm of the
query coordinates expressed in centered basis,
for each spatial dimensions \f$ \mathsf{x}\f$.
MULTIARCH inline MatrixType spaced2w(const VectorType& _q,
const DataPoint& /*attributes*/) const;
\brief First order derivative in scale \f$t\f$
......@@ -26,6 +26,23 @@ DistWeightFunc<DataPoint, WeightKernel>::spacedw( const VectorType& _q,
return result;
template <class DataPoint, class WeightKernel>
typename DistWeightFunc<DataPoint, WeightKernel>::MatrixType
DistWeightFunc<DataPoint, WeightKernel>::spaced2w( const VectorType& _q,
const DataPoint&) const
MatrixType result = MatrixType::Zero();
Scalar d = _q.norm();
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.diagonal().array() += der;
result *= Scalar(1.)/(m_t*d);
return result;
template <class DataPoint, class WeightKernel>
typename DistWeightFunc<DataPoint, WeightKernel>::Scalar
DistWeightFunc<DataPoint, WeightKernel>::scaledw( const VectorType& _q,
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