Linking surface integral of a gradient field to a contour integral I have a vector field $F$ deriving from a scalar potential $f$, i.e. $F=\text{grad}(f)$. I want to compute the integral of $F$ over a surface (To evaluate the flux of $F$). I think there exists a theorem linking this integral over a surface to the integral of $f$ over the edge of the surface but I can't find it. 
What I find is :
-Green theorem linking integration of $\text{div}(F)$ over a surface to $F$ over a line
-Stokes theorem linking integration of $\text{curl}(F)$ to integration of $F$. 
But no theorem linking integration of $F$ over a surface to $f$ over a contour.
Can someone help me ?
Thanks
 A: It sounds like you are trying to find the flux of a vector field through a surface with a boundary (i.e. not a closed surface around a voluminous region). Unfortunately, there isn't an integral theorem that allows you to related the flux through the surface to an integral around the boundary. See the second figure here.
I played around with this idea last time I was teaching Calc 3 and found a few counter examples. One problem is that there isn't an obvious way to orient the vector field around the boundary of the surface, and it depends on how you want to integrate the vector field over the surface.
How do you want to integrate the vector field over the surface? There are several ways to do it. Do you want to take its 'spatial' curl, it's 'spatial' divergence  , or something else. If you want to take the divergence of the component of the vector field which is tangential to the surface, this can be done: see this post. I like to think of it a projecting the vector field onto the surface and then applying the divergence theorem on that two-dimensional surface. It works and it is another special case of the Stoke's Theorem.
