Neumann condition

Hello everyone.
how to calculate the outward normal vector.
Because I want to find the value of Neumann condition.

When I use :
Neumann= dx(Uex)*N.x+dy(Uex)*N.y

I found
Neumann=
000000
000000

NB: Uex is the exact solution
Thanks.

The problem is by default N.X and N.Y is not defined correctly in general.

Merci cher professeur Frédéric pour votre réponse
Donc il n’existe pas un macro qui permet de calculer la condition de Neumann.
Cordialement.

You can lnear form to evaluate Neuman Condition on Poisson equation.



varf vNeuman(used,v) = int1d(Th)(v*(dx(Uex)*N.x+dy(Uex)*N.y)/lenEdge);
Vh vn; // Finite element function to store the Normal derivative
vn[]= vNeuman(0,Vh);

plot(vn,wait=1);