Xiang,
there is the InterpolatedTensorProductGridData that can do the interpolation
for you. It's meant for arbitrary dimensions, but of course also works in 1d.
But there are then two pieces missing that you need to provide yourself:
* You need to read the data into the arrays with which you create objects of
the class mentioned above.
* You will create an object of that type with dim==1. In your code, you will ask
fe_values.quadrature_point(q)
to get the coordinates of the q'th quadrature point, of which you will then
only use the last coordinate value to call the 1d function.
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email:
bang...@colostate.edu
www:
http://www.math.colostate.edu/~bangerth/