Neumann Green function with constant boundary flux (source code)

= Neumann Green function with constant boundary flux
{c}
{title2=$\Delta_xG(x,x_0)=\delta(x-x_0),\quad\partial_nG=1/|S|$}

For a smooth bounded connected <domain> $V$ with boundary $S$, integrating the <Green function> equation and applying the <divergence theorem> forces $\int_S\partial_nG\,dS=1$. Thus zero <Neumann boundary data> are incompatible with an unmodified unit point source. The displayed constant boundary derivative has the required total flux. For $\Delta\Phi=\sigma$ and $\partial_n\Phi=f$, the compatibility condition is $\int_V\sigma\,dV=\int_Sf\,dS$. <Green's second identity> then yields
$$
\Phi(x_0)=\int_VG(x,x_0)\sigma(x)dV-\int_SG(x,x_0)f(x)dS+\frac1{|S|}\int_S\Phi\,dS.
$$
The last term is an undetermined additive constant. Adding a constant to $G$ does not change the other two terms together, because of the compatibility condition. This construction keeps the unit <Dirac delta> source; using a mean-subtracted source with zero normal derivative is a different normalization.