def antisymmetric_disp_multiple(omega, k, thickness, num_points, rho, lamb,
                                mu):
    """
    Parameters
    ----------
    omega: Type, float or complex array
    DESCRIPTION. Frequency multiplied by 2*pi {rad/s}

    k: Type, complex array
    DESCRIPTION. wavenumber {rad/m}

    thickness: Type, float
    DESCRIPTION. thickness of the plate waveguide. {m}

    num_points: Type, float
    DESCRIPTION. number of points along thickness.

    rho: Type, float
    DESCRIPTION. density of the plate waveguide. {kg/m^3}

    lamb: Type, float
    DESCRIPTION. frequency value at which roots are solved at. {default: 1e6 Hz}

    mu: Type, float
    DESCRIPTION. frequency value at which roots are solved at. {default: 1e6 Hz}
    Returns
    -------
    antisymmetric Lamb wave displacement profiles for a given omega and k are arranged in a row: UX, UY
    """
    omega.shape = (len(omega), 1)  # formatting shape
    k.shape = (len(k), 1)  # formatting shape
    cL, cT = es.wave_speed_calculator(rho=rho, lamb=lamb, mu=mu)
    h = thickness / 2
    q = np.sqrt(omega**2 / (cT**2) - k**2)  # rad/m
    p = np.sqrt(omega**2 / (cL**2) - k**2)  # rad/m
    thick_vect = np.linspace(start=-h,
                             stop=h,
                             num=num_points,
                             dtype=np.complex128)
    thick_vect.shape = (1, len(thick_vect))  # formatting shape

    A1 = -(k**2 - q**2) * np.cos(q * h) / (2 * 1j * k * p * np.cos(p * h))

    UX = 1j * k * np.sin(p * thick_vect) * A1 - q * np.sin(q * thick_vect)
    UY = p * np.cos(p * thick_vect) * A1 - 1j * k * np.cos(q * thick_vect)

    thick_array = np.tile(thick_vect, (len(omega), 1))
    return np.hstack((thick_array, UX, UY))
@author: Christopher Hakoda
         [email protected]

"""

import numpy as np
import time
import matplotlib.pyplot as plt
import multiprocessing as mp
from functools import partial
import matplotlib as mpl
import elasticity as es

# Setting Global Parameters
thickness = 0.001
cL, cT = es.wave_speed_calculator(rho=2700, lamb=5.697675e10, mu=2.5947e10)
# phase velocity range of interest for the dispersion curves
cmin = 200  # m/s; approx. min phase velocity
cmax = 10000  # m/s; approx. max phase velocity
# frequency range of interest for the dispersion curves
fmin = 1  # Hz; linspace used so this isn't the real min
fmax = 20e6  # Hz; maximum frequency

error_threshold = 0.01  # rad/m; max variation


def main():
    # Note to self: make sure num_points is high enough otherwise some solutions will not be found. This is easier to find
    # when sweeping from low frequency to higher frequencies because, generally, num_points has to be higher for higher
    # frequencies.