R-Matrix Theory And Device Modeling.