Advanced semiconductor device theory