Hi Lars,
to interpolate functions with high accuracy, you should use the gf.Set(..) method.
You like to give your Dirichlet data parameterized by arc-length. The arc-legnth is special information, which is not available for arbitrary meshes, and does not make sense in 3D.
For special geometries, you can compute the arc-length by hand, or maybe you can use NGSolve to solve an ode at the boundary.
You can interpolate your boundary data either by a B-spline (1D), or by a VoxelCoefficientFunction (1D,2D,3D), and then use it like
Code:
mys = arctan2 (x,y)
bspline = BSpline( pntlist, datalist )
gfu.Set (bspline(mys), BND)
Joachim