Пример #1
0
    private static void Main()
    //****************************************************************************80
    //
    //  Purpose:
    //
    //    MAIN is the main program for PWL_INTERP_2D_TEST.
    //
    //  Discussion:
    //
    //    PWL_INTERP_2D_TEST tests the PWL_INTERP_2D library.
    //
    //  Licensing:
    //
    //    This code is distributed under the GNU LGPL license.
    //
    //  Modified:
    //
    //    15 October 2012
    //
    //  Author:
    //
    //    John Burkardt
    //
    {
        int[]     n_test     = { 2, 3, 4, 5, 9 };
        const int n_test_num = 5;
        int       prob;

        Console.WriteLine("");
        Console.WriteLine("PWL_INTERP_2D_TEST:");
        Console.WriteLine("  Test the PWL_INTERP_2D library.");
        Console.WriteLine("  The R8LIB library is needed.");
        Console.WriteLine("  The test needs the TEST_INTERP_2D library.");

        int prob_num = Data_2D.f00_num();

        //
        //  Numerical tests.
        //
        for (prob = 1; prob <= prob_num; prob++)
        {
            int i;
            for (i = 0; i < n_test_num; i++)
            {
                int n = n_test[i];
                test01(prob, n);
            }
        }

        //
        //  Terminate.
        //
        Console.WriteLine("");
        Console.WriteLine("PWL_INTERP_2D_TEST:");
        Console.WriteLine("  Normal end of execution.");
        Console.WriteLine("");
    }
Пример #2
0
    private static void Main()
    //****************************************************************************80
    //
    //  Purpose:
    //
    //    MAIN is the main program for SHEPARD_INTERP_2D_TEST.
    //
    //  Discussion:
    //
    //    SHEPARD_INTERP_2D_TEST tests the SHEPARD_INTERP_2D library.
    //
    //  Licensing:
    //
    //    This code is distributed under the GNU LGPL license.
    //
    //  Modified:
    //
    //    15 October 2012
    //
    //  Author:
    //
    //    John Burkardt
    //
    {
        double[] p_test =
        {
            1.0, 2.0, 4.0, 8.0
        }

        ;
        const int p_test_num = 4;
        int       prob;

        Console.WriteLine("");
        Console.WriteLine("SHEPARD_INTERP_2D_TEST:");
        Console.WriteLine("  Test the SHEPARD_INTERP_2D library.");
        Console.WriteLine("  The R8LIB library is needed.");
        Console.WriteLine("  This test also needs the TEST_INTERP_2D library.");

        int prob_num = Data_2D.f00_num();
        int g        = 1;

        for (prob = 1; prob <= prob_num; prob++)
        {
            int j;
            for (j = 0; j < p_test_num; j++)
            {
                double p = p_test[j];
                test01(prob, g, p);
            }
        }

        Console.WriteLine("");
        Console.WriteLine("SHEPARD_INTERP_2D_TEST:");
        Console.WriteLine("  Normal end of execution.");
        Console.WriteLine("");
    }
Пример #3
0
    private static void Main()
    //****************************************************************************80
    //
    //  Purpose:
    //
    //    MAIN is the main program for VANDERMONDE_INTERP_1D_TEST.
    //
    //  Discussion:
    //
    //    VANDERMONDE_INTERP_2D_TEST tests the VANDERMONDE_INTERP_2D library.
    //
    //  Licensing:
    //
    //    This code is distributed under the GNU LGPL license.
    //
    //  Modified:
    //
    //    07 October 2012
    //
    //  Author:
    //
    //    John Burkardt
    //
    {
        int[]     m_test     = { 1, 2, 3, 4, 8 };
        const int m_test_num = 5;
        int       prob;

        Console.WriteLine("");
        Console.WriteLine("VANDERMONDE_INTERP_2D_TEST:");
        Console.WriteLine("  Test the VANDERMONDE_INTERP_2D library.");
        Console.WriteLine("  The QR_SOLVE library is needed.");
        Console.WriteLine("  The R8LIB library is needed.");
        Console.WriteLine("  This test needs the TEST_INTERP_2D library.");

        int prob_num = Data_2D.f00_num();

        for (prob = 1; prob <= prob_num; prob++)
        {
            int j;
            for (j = 0; j < m_test_num; j++)
            {
                int m = m_test[j];
                test01(prob, m);
            }
        }

        //
        //  Terminate.
        //
        Console.WriteLine("");
        Console.WriteLine("VANDERMONDE_INTERP_2D_TEST:");
        Console.WriteLine("  Normal end of execution.");
        Console.WriteLine("");
    }
Пример #4
0
    private static void Main()
    //****************************************************************************80
    //
    //  Purpose:
    //
    //    MAIN is the main program for RBF_INTERP_2D_TEST.
    //
    //  Discussion:
    //
    //    RBF_INTERP_2D_TEST tests the RBF_INTERP_2D library.
    //
    //  Licensing:
    //
    //    This code is distributed under the GNU LGPL license.
    //
    //  Modified:
    //
    //    06 October 2012
    //
    //  Author:
    //
    //    John Burkardt
    //
    {
        int prob;

        Console.WriteLine("");
        Console.WriteLine("RBF_INTERP_2D_TEST:");
        Console.WriteLine("  Test the RBF_INTERP_2D library.");
        Console.WriteLine("  The R8LIB library is required.");
        Console.WriteLine("  This test also needs the TEST_INTERP_2D library.");

        int       prob_num = Data_2D.f00_num();
        const int g        = 1;

        for (prob = 1; prob <= prob_num; prob++)
        {
            test01(prob, g, RadialBasisFunctions.phi1, "phi1");
            test01(prob, g, RadialBasisFunctions.phi2, "phi2");
            test01(prob, g, RadialBasisFunctions.phi3, "phi3");
            test01(prob, g, RadialBasisFunctions.phi4, "phi4");
        }

        //
        //  Terminate.
        //
        Console.WriteLine("");
        Console.WriteLine("RBF_INTERP_2D_TEST:");
        Console.WriteLine("  Normal end of execution.");
        Console.WriteLine("");
    }
Пример #5
0
    private static void Main()
    //****************************************************************************80
    //
    //  Purpose:
    //
    //    MAIN is the main program for PWL_INTERP_2D_SCATTERED_TEST.
    //
    //  Discussion:
    //
    //    PWL_INTERP_2D_SCATTERED_TEST tests the PWL_INTERP_2D_SCATTERED library.
    //
    //  Licensing:
    //
    //    This code is distributed under the GNU LGPL license.
    //
    //  Modified:
    //
    //    25 October 2012
    //
    //  Author:
    //
    //    John Burkardt
    //
    {
        int prob;

        Console.WriteLine("");
        Console.WriteLine("PWL_INTERP_2D_SCATTERED_TEST:");
        Console.WriteLine("  Test the PWL_INTERP_2D_SCATTERED library.");
        Console.WriteLine("  The R8LIB library is needed.");
        Console.WriteLine("  This test also needs the TEST_INTERP_2D library.");

        test01();
        test02();
        //
        //  Numerical tests.
        //
        int prob_num = Data_2D.f00_num();

        for (prob = 1; prob <= prob_num; prob++)
        {
            test03(prob);
        }

        Console.WriteLine("");
        Console.WriteLine("PWL_INTERP_2D_SCATTERED_TEST:");
        Console.WriteLine("  Normal end of execution.");
        Console.WriteLine("");
    }
Пример #6
0
    private static void Main()
    //****************************************************************************80
    //
    //  Purpose:
    //
    //    MAIN is the main program for LAGRANGE_INTERP_2D_TEST.
    //
    //  Discussion:
    //
    //    LAGRANGE_INTERP_2D_TEST tests the LAGRANGE_INTERP_2D library.
    //
    //  Licensing:
    //
    //    This code is distributed under the GNU LGPL license.
    //
    //  Modified:
    //
    //    13 September 2012
    //
    //  Author:
    //
    //    John Burkardt
    //
    {
        int[] m_test =
        {
            1, 2, 3, 4, 8
        }

        ;
        int m_test_num = 5;
        int prob;

        Console.WriteLine("");
        Console.WriteLine("LAGRANGE_INTERP_2D_TEST:");
        Console.WriteLine("  Test the LAGRANGE_INTERP_2D library.");
        Console.WriteLine("  The R8LIB library is needed.");
        Console.WriteLine("  This test also needs the TEST_INTERP_2D library.");

        int prob_num = Data_2D.f00_num();

        //
        //  Numerical tests.
        //
        for (prob = 1; prob <= prob_num; prob++)
        {
            int i;
            for (i = 0; i < m_test_num; i++)
            {
                int m = m_test[i];
                test01(prob, m);
            }
        }

        //
        //  Terminate.
        //
        Console.WriteLine("");
        Console.WriteLine("LAGRANGE_INTERP_2D_TEST:");
        Console.WriteLine("  Normal end of execution.");
        Console.WriteLine("");
    }