A Multiscale simulation environment for electronic and optoelectronic devices