Consider this BVP with variable coefficients:$$-\nabla\cdot(a\nabla u) = f\ in\ \Omega$$$$-n\cdot(a\nabla u) = \kappa(u-g_D)-g_N\ on\ \partial \Omega$$where $a>0,f,\kappa>0,g_D,g_N$ are given functions. To obtain the variational formulation of this problem, multiply $f=-\nabla\cdot(a\nabla u)$ by a test function $v$ and integrate over the domain $\Omega$:$$\int_{\Omega} fv\ dx = \int_{\Omega}-\nabla\cdot(a\nabla u)v\ dx$$$$= \int_{\Omega} a\nabla u\cdot \nabla v\ dx-\int_{\partial \Omega}n\cdot (a\nabla u)v\ ds$$$$= \int_{\Omega} a\nabla u\cdot \nabla v\ dx-\int_{\partial \Omega} (\kappa(u-g_D)-g_N)v\ ds$$Green's thm was used in the second-to-last equality, and for the final equality we just used the BC. The steps and calculations following this are not a problem.Now consider the BVP$$-\Delta u=f\ in\ \Omega$$$$u=\sin{2\pi x_1}\cdot \sin{2\pi x_2}\ on\ \partial \Omega$$Following the same idea as above we end up with$$\int_{\Omega} fv\ dx = \int_{\Omega} \nabla u\cdot \nabla v\ dx-\int_{\partial \Omega} n\cdot \nabla uv\ ds$$At this point I am stuck. What should I do about $n$? I can't find any clues on this particular problem anywhere. Should I attempt to eliminate $n$ as in the first example (if so, how?), or should I use $n$ directly in further calculations?I'm just looking for hints on how to handle $n$, no one seems to have had this same problem though.
Surface Normal for 2D Finite Element Method
finite element;poisson;homework