def get_A(self, function):
        A = zeros((self.nmax, self.nmax), dtype=complex)
        m = 1
        for i in range(self.nmax):
            for k in range(self.nmax):
                n = i + m
                l = k + m
                func = lambda nu: function(m, n,l)(nu) * \
                                   spheroidal.metric_phi(nu, self.particle) *\
                                   spheroidal.get_integral_metric(self.particle)(nu)

                A[i][k] = spheroidal.quad(func, -1, 1)
        return mat(A)
Esempio n. 2
0
    def get_A(self,function):
        A = zeros((self.nmax, self.nmax), dtype=complex)
        m = 1
        for i in range(self.nmax):
            for k in range(self.nmax):
                n = i + m
                l = k + m
                func = lambda nu: function(m, n,l)(nu) * \
                                   spheroidal.metric_phi(nu, self.particle) *\
                                   spheroidal.get_integral_metric(self.particle)(nu)

                A[i][k] = spheroidal.quad(func, -1, 1)
        return  mat(A)
 def __get_Z(self, z_function, c2, c1, rank):
     Z = zeros((self.nmax, self.nmax), dtype=complex)
     type = self.particle.type
     m = 1
     for i in range(self.nmax):
         for k in range(self.nmax):
             l = i + m
             n = k + m
             cv_l = get_cv(m, l, c2, type)
             cv_n = get_cv(m, n, c1, type)
             func = lambda nu: z_function(m, l, c2, cv_l, rank, self.particle)(nu) *\
                               ang1_cv(m, n, c1, cv_n, type, nu)[0] * spheroidal.metric_phi(nu, self.particle)\
                               * spheroidal.get_integral_metric(self.particle)(nu)
             Z[i][k] = spheroidal.quad(func, -1, 1)
     return mat(Z)
Esempio n. 4
0
 def __get_Z(self,z_function,c2,c1, rank):
     Z = zeros((self.nmax, self.nmax),dtype=complex)
     type = self.particle.type
     m = 1
     for i in range(self.nmax):
         for k in range(self.nmax):
             l = i + m
             n = k + m
             cv_l = get_cv(m, l, c2, type)
             cv_n = get_cv(m, n, c1, type)
             func = lambda nu: z_function(m, l, c2, cv_l, rank, self.particle)(nu) *\
                               ang1_cv(m, n, c1, cv_n, type, nu)[0] * spheroidal.metric_phi(nu, self.particle)\
                               * spheroidal.get_integral_metric(self.particle)(nu)
             Z[i][k] = spheroidal.quad(func, -1, 1)
     return mat(Z)
Esempio n. 5
0
    def get_BRi(self):
        Br = zeros((self.nmax, self.nmax), dtype=complex)
        type = self.particle.type
        m = 1
        for i in range(self.nmax):
            for k in range(self.nmax):
                n = i + m
                l = k + m
                cv_l = get_cv(m, l, self.c2, type)
                cv_n = get_cv(m, n, self.c1, type)
                func = lambda nu: (spheroidal.get_a_function(m, l, self.c2, cv_l, 1, self.particle)(nu) * \
                                  spheroidal.get_b_function(m, n, self.c1, cv_n, 1, self.particle)(nu) - \
                                  spheroidal.get_c_function(m, l, self.c2, cv_l, 1, self.particle)(nu) * \
                                  spheroidal.get_a_function(m, n, self.c1, cv_n, 1, self.particle)(nu)) * spheroidal.metric_phi(nu, self.particle)\
                                  * spheroidal.get_integral_metric(self.particle)(nu)

                Br[i][k] = spheroidal.quad(func, -1, 1)
        return -1j * mat(Br)
Esempio n. 6
0
    def get_BRi(self):
        Br = zeros((self.nmax, self.nmax), dtype=complex)
        type = self.particle.type
        m = 1
        for i in range(self.nmax):
            for k in range(self.nmax):
                n = i + m
                l = k + m
                cv_l = get_cv(m, l, self.c2, type)
                cv_n = get_cv(m, n, self.c1, type)
                func = lambda nu: (spheroidal.get_a_function(m, l, self.c2, cv_l, 1, self.particle)(nu) * \
                                  spheroidal.get_b_function(m, n, self.c1, cv_n, 1, self.particle)(nu) - \
                                  spheroidal.get_c_function(m, l, self.c2, cv_l, 1, self.particle)(nu) * \
                                  spheroidal.get_a_function(m, n, self.c1, cv_n, 1, self.particle)(nu)) * spheroidal.metric_phi(nu, self.particle)\
                                  * spheroidal.get_integral_metric(self.particle)(nu)

                Br[i][k] = spheroidal.quad(func, -1, 1)
        return  -1j * mat(Br)