Say I have a discrete function $f(x,y)$ defined at set of $N$ coordinates $(x_p, y_p)$ that do not correspond with mesh vertices. I would like to interpolate the data onto the function space $V_h$ such that $f_h \approx f$ where $f_h \in V_h$. In other words, perform the operation
$$f_h = \sum_{i=1}^n f(x_p, y_p) \phi_i(x_p, y_p),$$
where $\phi_i$ is the P1 Lagrange finite-element basis function defined for $i =1,2,\ldots,n$ nodal points..
It seems like the FEniCS machinery could already be in place for this... For example, the basis functions can be evaluated at a given point using element.evaluate_basis()
.