Computation of Complex Band Structures in Bulk and Confined Structures