1. A computerized method comprising: modeling a structure, the structure being finite and having an inhomogeneous media, the structure represented by a differential equation using a Laplacian operator and a prescribed potential, the modeling of the structure including representing the inhomogeneous media as an open domain or an unbounded domain in terms of a spectral element, the open domain or the unbounded domain having an interval of semi-infinite length or infinite length; mapping the interval of semi-infinite length or infinite length to an interval of finite length; applying a deformation of a coordinate system of the differential equation to complex coordinates along a contour in a complex plane such that eigenfunctions of the differential equation remain bounded; determining an eigenvalue and an associated eigenfunction for the structure using the mapped interval and the deformed coordinate system; storing the determined eigenvalue in a memory; and providing a characteristic of the structure to an output, the characteristic related to the eigenvalue or the associated eigenfunction.