示例#1
0
        private static void DetailCheckSetup()
        {
            int n       = 50;
            int spacing = 1;

            double[] x = new double[n];
            double[] b = new double[n];
            MultidimensionalArray M = MultidimensionalArray.Create(n, n);

            // create some array
            for (int i = 0; i < n; i++)
            {
                b[i] = 1;
                for (int j = 0; j < n; j++)
                {
                    M[i, j] = i + Math.Pow(j, i);
                }
            }

            try
            {
                Console.Write("Starting with a test of LAPACK Function DGETRF\n");
                M.Solve(x, b);
                Console.Write("Succesfully called DGETRF\n\n");

                Console.Write("Starting with a test of BLAS Function DDOT\n");
                BLAS.DDOT(ref n, x, ref spacing, b, ref spacing);
                Console.Write("Succesfully called DDOT\n\n");

                Console.Write("Starting with a test of Tecplot Function tecnod110\n");
                Console.Write("This test is not yet implemented\n");
                Console.Write("Succesfully called Tecplot Function tecnod110\n\n");

                Console.Write("Starting with a test of METIS Function \n");
                Console.Write("This test is not yet implemented\n");
                Console.Write("Succesfully called METIS \n\n");

                Console.Write("Starting with a test of the MUMPS Solver\n");
                Console.Write("This test is not yet implemented\n");
                Console.Write("Succesfully called the MUMPS Solver\n\n");

                Console.Write("Starting with a test of the PARDISO Solver\n");
                Console.Write("This test is not yet implemented\n");
                Console.Write("Succesfully called the PARDISO Solver\n\n");
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }
        }