def _space_product(eA_eigen_vals,eB_eigen_vals): """ Returns a list containing the eigen-values and their multiplicities of the Laplacien in the E_A X E_B manifold. eA_eigen_vals : [list of dict] eigen-values and their multiplicities of a manifold eA eB_eigen_vals : [list of dict] eigen-values and their multiplicities of a manifold eB """ eA_ev_factor = [ v['value'] for v in eA_eigen_vals] eB_ev_factor = [ v['value'] for v in eB_eigen_vals] eA_m_factor = [ v['multiplicity'] for v in eA_eigen_vals] eB_m_factor = [ v['multiplicity'] for v in eB_eigen_vals] ev_cartesian_prod = cartesian([eA_ev_factor,eB_ev_factor]) m_cartesian_prod = cartesian([eA_m_factor,eA_m_factor]) values = [np.sum(ev_cartesian_prod[k]) for k in range(len(ev_cartesian_prod))] multiplicities = [np.prod(m_cartesian_prod[k]) for k in range(len(m_cartesian_prod))] eigen_vals = [ {'value' : values[k], 'multiplicity' : multiplicities[k] } for k in range(len(values)) ] return eigen_vals
def n_torus(F=[0.1], c=3.4e2, j_max=1, **unusedkwargs): """ Returns a list containing eigen-values of the Laplacien in the n-torus manifold. c : [float] sound velocity F : [list] list of length = containing c/l1, c/l2, ...; where l1, l2, ... are the n-torus lengths j_max : [int] set index of eigen-values to compute as {-j_max, ..., j_max} in each direction """ n = len(F) k_list = [ [np.square(2*np.pi*j*F[index]/c) for j in range(1, j_max+1)] for index in range(n) ] cartesian_prod = cartesian(k_list) values = [np.sum(cartesian_prod[k]) for k in range(len(cartesian_prod))] eigen_vals = [ {'value' : values[k], 'multiplicity' : 2**(n-1) } for k in range(len(values)) ] return eigen_vals