Coupling atomistic and finite element approaches for the simulation of optoelectronic devices