A mesh-optimization technique is applied to the numerical simulation of semiconductor devices. The technique consists of moving the mesh-nodes while keeping their number constant, and is based upon the maximization of a functional related to the RHS of Poisson\´s equation. The result is equivalent to the minimization of the seminorm of

, where

is the normalized electric potential and u
Tits discretization over mesh

. The nodal-coordinate variations

induce variations

onto the electric potential, yielding a system of algebraic equations where both unknown vectors

,

appear. A suitable technique avoids any matrix inversion and allows application of the gradient method for the maximization procedure. The method has been tested on a one-dimensional Poisson solver for bipolar transistors.