TFEL/MathThe computeLinearInterpolation allows to compute the
linear inteporlation of a set of data by the arrays of abscissae and
values respectively.
The computeLinearInterpolationAndDerivative returns the
a pair containing the value resulting for the linear interpolation and
the derivative.
The first template argument of those functions is a boolean stating if extrapolation must be performed.
constexprconstexpr std::array<time, 3u> abscissae{time{0}, time{1}, time{2}};
constexpr std::array<stress, 3u> values{stress{1}, stress{2}, stress{4}};
constexpr auto v = tfel::math::computeLinearInterpolation<true>(abscissae, values,
time{-1});