Example #1
0
 def test_compute_L_02(self):
     k = 10.0
     p = np.array([0.5, 0.75], dtype=np.float32)
     a = np.array([0.0, 0.00], dtype=np.float32)
     b = np.array([0.0, 0.10], dtype=np.float32)
     pOnElement = False
     zP = iops_pyx.l_2d(k, p, a, b, pOnElement)
     zC = iops_cpp.l_2d(k, p, a, b, pOnElement)
     self.assertAlmostEqual(zP, zC)
     zS = iops_sci.l_2d(k, p, a, b, pOnElement)
     self.assertAlmostEqual(zP, zS)
Example #2
0
 def test_compute_L_01(self):
     gld = -.62808617768766E-01 + 0.00000000000000E+00j
     k = 0.0
     p_on_element = False
     pyx = iops_pyx.l_2d(k, self.p_off, self.a, self.b, p_on_element)
     self.assertAlmostEqual(pyx, gld)
     cpp = iops_cpp.l_2d(k, self.p_off, self.a, self.b, p_on_element)
     self.assertAlmostEqual(cpp, gld)
     cpp = iops_cpp.l_2d_off_k0(self.p_off, self.a, self.b)
     self.assertAlmostEqual(cpp, gld)
     sci = iops_sci.l_2d(k, self.p_off, self.a, self.b, p_on_element)
     self.assertAlmostEqual(sci, gld)
     sci = iops_sci.l_2d_off_k0(self.p_off, self.a, self.b)
     self.assertAlmostEqual(sci, gld)
Example #3
0
 def test_compute_L_03(self):
     gld = 0.20238278599287E+00 + 0.00000000000000E+00j
     k = 0.0
     p_on_element = True
     pyx = iops_pyx.l_2d(k, self.p_on, self.a, self.b, p_on_element)
     self.assertAlmostEqual(pyx, gld)
     cpp = iops_cpp.l_2d(k, self.p_on, self.a, self.b, p_on_element)
     self.assertAlmostEqual(cpp, gld)
     cpp = iops_cpp.l_2d_on_k0(self.a, self.b)
     self.assertAlmostEqual(cpp, gld)
     sci = iops_sci.l_2d(k, self.p_on, self.a, self.b, p_on_element)
     self.assertAlmostEqual(sci, gld)
     sci = iops_sci.l_2d_on_k0(self.a, self.b)
     self.assertAlmostEqual(sci, gld)
Example #4
0
 def test_compute_L_04(self):
     gld = -.10438221373809E-01 + 0.26590088538927E-01j
     k = 16.0
     p_on_element = True
     pyx = iops_pyx.l_2d(k, self.p_on, self.a, self.b, p_on_element)
     self.assertAlmostEqual(pyx, gld)
     cpp = iops_cpp.l_2d(k, self.p_on, self.a, self.b, p_on_element)
     self.assertAlmostEqual(cpp, gld)
     cpp = iops_cpp.l_2d_on(k, self.p_on, self.a, self.b)
     self.assertAlmostEqual(cpp, gld)
     sci = iops_sci.l_2d(k, self.p_on, self.a, self.b, p_on_element)
     self.assertAlmostEqual(sci, gld, 6)
     sci = iops_sci.l_2d_on(k, self.p_on, self.a, self.b)
     self.assertAlmostEqual(sci, gld, 6)
Example #5
0
 def test_compute_L_02(self):
     gld = -.38848700688676E-02 + 0.18666063352484E-01j
     k = 16.0
     p_on_element = False
     pyx = iops_pyx.l_2d(k, self.p_off, self.a, self.b, p_on_element)
     self.assertAlmostEqual(pyx, gld)
     cpp = iops_cpp.l_2d(k, self.p_off, self.a, self.b, p_on_element)
     self.assertAlmostEqual(cpp, gld)
     cpp = iops_cpp.l_2d_off(k, self.p_off, self.a, self.b)
     self.assertAlmostEqual(cpp, gld)
     sci = iops_sci.l_2d(k, self.p_off, self.a, self.b, p_on_element)
     self.assertAlmostEqual(sci, gld)
     sci = iops_sci.l_2d_off(k, self.p_off, self.a, self.b)
     self.assertAlmostEqual(sci, gld)