hi,
I am implementing Poisson equation with Dirichlet Boundary condition. With the help of Fenics demo, it is not difficult for us to implement it. However, I find it difficult to calculate the values related to the tangential direction. 
The problems can be expressed as follows:
\Delta m  =                                                    f;             in    \Omega
m            =  (\grad(\phi) \cdot \tau ) \cdot \tau;             on  \partial \Omega
where \phi is a function which is known from the previous step, and \tau is the tangential direction of boundaries. 
As we know, \phi is a function of the domain, and \tau is orthogonal to the norm direction of boundaries. 
The prototype of my problem comes from gauge method for imcompressible Navier-Stokes problem. More details can be found:  https://web.math.princeton.edu/~weinan/pdf%20files/gauge%20method.pdf
I do not know whether my question expressed clearly. 
Looking forward for your help. 
Thanks a lot!
===========
Hamilton
########    16/07/2017
I do not know how to respond to  Wilhelmbraun's kind comments directly, much thanks to him. 
As said, I can export the solution $\phi$ or $\nabla(\phi)$ point by point. However, when I try to export $\nabla(\phi)\cdot \tau$, the code does not work. I think it may because $\tau$ is defined on boundaries,  and $\phi$ is defined in the domain. 
So, do you know how to export $\tau$ on boundaries. 
Or is there some convenient way to implement wihin the FeniCS framework without export and inport files frequently.
Thanks 
Hamilton