This is from the DOLFIN tutorial (link):
Mixed Poisson problem $$ \sigma - \nabla u = 0 , \text{ on } \Omega\\ \nabla \cdot \sigma = -f, \text{ on } \Omega $$ and $$ u=u_0 \text{ on } \Gamma_D, \\ \sigma \cdot n = g \text{ on } \Gamma_N $$
then the variational form is: $$ \int_{\Omega} (\sigma \cdot \tau + (\nabla \cdot \tau) u) ~dx = \int_{\Gamma} (\tau \cdot n) u ~ds, ~ \forall \tau \in \Sigma \\ \int_{\Omega} (\nabla \cdot \sigma) v ~ dx = - \int_{\Omega} fv ~ dx, ~ \forall v \in V. $$ They now claim "Looking at the variational form, we see that the boundary condition for the flux is now an essential boundary condition (which should be enforced in the function space), while the other boundary condition is a natural boundary condition (which should be applied to the variational form)."
2 questions arise for me:
How are they determining which boundary condition to place where? My inclination would be to place $g$ in the variational form and enforce $u_0$ in the space $V$, OR use $V=\{ v \in L^2: v=0 \text{ on } \Gamma_D\}$ and solve the problem for $w \in V$ where $w=u-u_0$ (the typical procedure for the non-homogeneous Poisson problem).
With their choice, they use $V=L^2$ and $\Sigma= \{\tau \in H(div): \tau\cdot n=g \text{ on } \Gamma_N\}$. Then integral $\int_{\Gamma_N}(\tau\cdot n)u ~ ds$ becomes zero, but why?