Simulation of MOSFETs, BJTs and JFETs at and near the pinch-off region