Exemple #1
0
 def test(self):
     rhs = self.rhs
     sol = self.sol
     Ainv = Pardiso(self.A, is_symmetric=True)
     for i in range(3):
         self.assertLess(np.linalg.norm(Ainv * rhs[:, i] - sol[:, i]), TOL)
     self.assertLess(np.linalg.norm(Ainv * rhs - sol, np.inf), TOL)
     Ainv.clean()
Exemple #2
0
 def test(self):
     rhs = self.rhs
     sol = self.sol
     Ainv = Pardiso(self.A, is_symmetric=True)
     for i in range(3):
         self.assertLess(np.linalg.norm(Ainv * rhs[:, i] - sol[:, i]), TOL)
     self.assertLess(np.linalg.norm(Ainv * rhs - sol, np.inf), TOL)
     Ainv.clean()
Exemple #3
0
    def test(self):
        rhs = self.rhs
        sol = self.sol
        Ainv = Pardiso(self.A, is_symmetric=True, check_accuracy=True)
        self.assertRaises(Exception, lambda: Ainv * rhs)
        Ainv.clean()

        Ainv = Pardiso(self.A)
        for i in range(3):
            self.assertLess(np.linalg.norm(Ainv * rhs[:, i] - sol[:, i]), TOL)
        self.assertLess(np.linalg.norm(Ainv * rhs - sol, np.inf), TOL)
        Ainv.clean()
Exemple #4
0
    def test(self):
        rhs = self.rhs
        sol = self.sol
        Ainv = Pardiso(self.A, is_symmetric=True, check_accuracy=True)
        self.assertRaises(Exception, lambda: Ainv * rhs)
        Ainv.clean()

        Ainv = Pardiso(self.A)
        for i in range(3):
            self.assertLess(np.linalg.norm(Ainv * rhs[:, i] - sol[:, i]), TOL)
        self.assertLess(np.linalg.norm(Ainv * rhs - sol, np.inf), TOL)
        Ainv.clean()