{
"Assumed only one coordinate given taking first coordinate "
"for interpolation");
int i;
for(i = 0; i < npts-1; ++i)
{
if((
m_pts[0][i] <= coord) && (coord <=
m_pts[0][i+1]))
{
if(npts <= 2)
{
{
* (m_pts[0][i+1] - coord) / pdiff
* (coord - m_pts[0][i]) / pdiff;
}
}
else
{
if(i < npts-2)
{
NekDouble pdiff2 = m_pts[0][i+2] - m_pts[0][i+1];
* (m_pts[0][i+2] - coord)
/ (pdiff * (pdiff+pdiff2));
* (m_pts[0][i+2] - coord)
/ (pdiff * pdiff2);
* (coord - m_pts[0][i+1])
/ ((pdiff + pdiff2) * pdiff2);
{
intfields[j] = m_pts[
m_ptsDim+j][i] * h1
}
}
else
{
NekDouble pdiff2 = m_pts[0][i] - m_pts[0][i-1];
* (coord - m_pts[0][i-1])
/ (pdiff * pdiff2);
* (coord - m_pts[0][i-1])
/ (pdiff * (pdiff + pdiff2));
* (m_pts[0][i+1] - coord)
/ ((pdiff + pdiff2) * pdiff);
{
intfields[j] = m_pts[
m_ptsDim+j][i] * h1
}
}
}
break;
}
}
ASSERTL0(i != npts-1,
"Failed to find coordinate " +
boost::lexical_cast<string>(coord) +
" within provided input points");
};