Can I define f at given vertices, such as (x0, y0) which is the coordinate of a vertex.
I tried f(x0,y0)=2*x0+y0, which was illegal.
It seems I can do f[ ][ i ] = … but how I could know the index i ?

To day the simple way, is a little tricky, because it integration on meshL of 2d finite element function buggius. so the idea is to build a 2d mesh such that one border is your line.