# Path: blond/utils/bmath.py
# def use_mpi():
# def mpiMode():
# def use_fftw():
# def use_precision(_precision='double'):
# def update_active_dict(new_dict):


from builtins import range, object
from scipy.constants import e
from ..utils import bmath as bm
import numpy as np
import ctypes

            self.n_particles/(self.n_macroparticles*self.Q)
        self.induced_voltage = np.zeros(len(self.beam.dt))
        self.induced_voltage[0] = self.const/2
        self.coeff1 = -self.alpha/self.omega_bar
        self.coeff2 = -self.R_S*self.omega_R/(self.Q*self.omega_bar)
        self.coeff3 = self.omega_R*self.Q/(self.R_S*self.omega_bar)
        self.coeff4 = self.alpha/self.omega_bar
        self.input_first_component = 1
        self.input_second_component = 0
        self.t_rev = t_rev
        self.last_dt = self.beam.dt[-1]
        self.array_parameters = np.array([self.input_first_component,
                                          self.input_second_component, self.t_rev, self.last_dt])

    def track_cpp(self):
        r"""
        Voltage in time domain (single-turn) using MuSiC (C++ code).
        Note: this method should also be called at turn number 1 when
        multi-turn voltage computations are needed.

        Examples
        --------
        >>> import impedances.music as musClass
        >>> from setup_cpp import libblond
        >>>  
        >>> music_cpp = musClass.Music(my_beam, [R_S, 2*np.pi*frequency_R, Q], 
        >>>                               n_macroparticles, n_particles, t_rev)
        >>> music_cpp.track_cpp()

        """

# Path: blond/utils/bmath.py
# def use_mpi():
# def mpiMode():
# def use_fftw():
# def use_precision(_precision='double'):
# def update_active_dict(new_dict):


# Path: blond/impedances/music.py
from builtins import range, object
from scipy.constants import e
from ..utils import bmath as bm
import numpy as np
import ctypes

            self.n_particles/(self.n_macroparticles*self.Q)
        self.induced_voltage = np.zeros(len(self.beam.dt))
        self.induced_voltage[0] = self.const/2
        self.coeff1 = -self.alpha/self.omega_bar
        self.coeff2 = -self.R_S*self.omega_R/(self.Q*self.omega_bar)
        self.coeff3 = self.omega_R*self.Q/(self.R_S*self.omega_bar)
        self.coeff4 = self.alpha/self.omega_bar
        self.input_first_component = 1
        self.input_second_component = 0
        self.t_rev = t_rev
        self.last_dt = self.beam.dt[-1]
        self.array_parameters = np.array([self.input_first_component,
                                          self.input_second_component, self.t_rev, self.last_dt])

    def track_cpp(self):
        r"""
        Voltage in time domain (single-turn) using MuSiC (C++ code).
        Note: this method should also be called at turn number 1 when
        multi-turn voltage computations are needed.

        Examples
        --------
        >>> import impedances.music as musClass
        >>> from setup_cpp import libblond
        >>>  
        >>> music_cpp = musClass.Music(my_beam, [R_S, 2*np.pi*frequency_R, Q], 
        >>>                               n_macroparticles, n_particles, t_rev)
        >>> music_cpp.track_cpp()

        """

        bm.music_track(self.beam.dt, self.beam.dE, self.induced_voltage,
