#ifndef INTERPOLATE_POLYNOMIAL_HPP_ #define INTERPOLATE_POLYNOMIAL_HPP_ #include namespace VMG { class Grid; class Index; class InterpolatePolynomial { public: InterpolatePolynomial(const unsigned int& degree); ~InterpolatePolynomial(); void ComputeCoefficients(const Grid& grid, const Index& index); vmg_float Evaluate(const Vector& pos); Vector EvaluateGradient(const Vector& pos); private: vmg_float& _access_coeff(const Index& index) { return coeff[index.Z() + deg_1 * (index.Y() + deg_1 * index.X())]; } vmg_float& _access_coeff(const int& i, const int& j, const int& k) { return coeff[k + deg_1 * (j + deg_1 * i)]; } void _compute_coefficients_1d(const Index& index, const unsigned int& direction); vmg_float* coeff; unsigned int deg_1; Vector pos_begin; Vector h; }; } #endif /* INTERPOLATE_POLYNOMIAL_HPP_ */