I was almost sure this was implemented in the past, but it was not working.
Now, if n = 0 or if n is not provided, particles are injected with the normal to the surface.
So it seems that rectangles and triangles are now working properly.
I have also checked the phy2log routine, now it seems a bit more complicated, but it is much clearer.
Maybe in the future is worth rethinking to improve speed (specially for quad elements)
Now they give the right electric field.
I have to change 2DCyl.
However, there was some insonsistency between the change of coordinates in phy2log and the Jacobian for the K matrix. I fixed it putting a transpose() in phy2log, but I don't like that solution.
I need to review the basic procedure of phy2log.
After reading some works and reviewing what I had, I've done some
corrections to how the randomb velicities in Maxwellian distributions
are calculated. These should be correct now.
The Poisson equation was not working because I didn't finish
implementing the new type of BCs. Dirichlet is probably untested. I
should stop doing shitty developments and no testing.