Esempio n. 1
0
 def test_interrelations_k_exact(self):
     n = 7
     x = 5.746161870059113
     left = np.complex(sph_kn_exact(n, x))
     right = np.complex((-1)**(n + 1) * pi / 2 *
                        (sph_i1n_exact(n, x) - sph_i2n_exact(n, x)))
     assert_allclose(left, right)
Esempio n. 2
0
 def test_sph_i12_exact(self):
     x = 9.810801919951345
     desired = (1 / x + 3 / x ** 3) * np.sinh(x) - 3 / x ** 2 * np.cosh(x)
     actual = np.complex(sph_i1n_exact(2, x))
     assert_allclose(actual, desired)
Esempio n. 3
0
 def test_sph_i11_exact(self):
     x = 6.802805007381322
     desired = -np.sinh(x) / x ** 2 + np.cosh(x) / x
     actual = np.complex(sph_i1n_exact(1, x))
     assert_allclose(actual, desired)
Esempio n. 4
0
 def test_sph_i10_exact(self):
     x = 62.3
     desired = np.sinh(x) / x
     actual = np.complex(sph_i1n_exact(0, x))
     assert_allclose(actual, desired)
Esempio n. 5
0
 def test_interrelations_i1_exact(self):
     n = 3
     x = 1.9513017144556937
     left = np.complex(sph_i1n_exact(n, x))
     right = np.complex(mpc(0, 1) ** (-n) * sph_jn_exact(n, 1j * x))
     assert_allclose(left, right)
Esempio n. 6
0
 def test_interrelations_k_exact(self):
     n = 7
     x = 5.746161870059113
     left = np.complex(sph_kn_exact(n, x))
     right = np.complex((-1) ** (n + 1) * pi / 2 * (sph_i1n_exact(n, x) - sph_i2n_exact(n, x)))
     assert_allclose(left, right)
Esempio n. 7
0
 def test_sph_i12_exact(self):
     x = 9.810801919951345
     desired = (1 / x + 3 / x**3) * np.sinh(x) - 3 / x**2 * np.cosh(x)
     actual = np.complex(sph_i1n_exact(2, x))
     assert_allclose(actual, desired)
Esempio n. 8
0
 def test_sph_i11_exact(self):
     x = 6.802805007381322
     desired = -np.sinh(x) / x**2 + np.cosh(x) / x
     actual = np.complex(sph_i1n_exact(1, x))
     assert_allclose(actual, desired)
Esempio n. 9
0
 def test_sph_i10_exact(self):
     x = 62.3
     desired = np.sinh(x) / x
     actual = np.complex(sph_i1n_exact(0, x))
     assert_allclose(actual, desired)
Esempio n. 10
0
 def test_interrelations_i1_exact(self):
     n = 3
     x = 1.9513017144556937
     left = np.complex(sph_i1n_exact(n, x))
     right = np.complex(mpc(0, 1)**(-n) * sph_jn_exact(n, 1j * x))
     assert_allclose(left, right)