Solving bent waveguides in FDE and FEEM