示例#1
0
    private static void test04(int dim_min, int dim_max, int level_max_min, int level_max_max)
//****************************************************************************80
//
//  Purpose:
//
//    TEST04 tests GP_SE_SIZE.
//
//  Licensing:
//
//    This code is distributed under the GNU LGPL license.
//
//  Modified:
//
//    15 January 2010
//
//  Author:
//
//    John Burkardt
//
//  Parameters:
//
//    Input, int DIM_MIN, the minimum spatial dimension to consider.
//
//    Input, int DIM_MAX, the maximum spatial dimension to consider.
//
//    Input, int LEVEL_MAX_MIN, the minimum value of LEVEL_MAX to consider.
//
//    Input, int LEVEL_MAX_MAX, the maximum value of LEVEL_MAX to consider.
//
    {
        Console.WriteLine("");
        Console.WriteLine("TEST04");
        Console.WriteLine("  GP_SE_SIZE returns the number of ");
        Console.WriteLine("  distinct points in a sparse grid made from ");
        Console.WriteLine("  * GP_SE, Gauss Patterson Slow Exponential Growth family.");
        Console.WriteLine("");
        string cout = "   DIM: ";

        for (int dim_num = dim_min; dim_num <= dim_max; dim_num++)
        {
            cout += "  " + dim_num.ToString().PadLeft(10);
        }

        Console.WriteLine(cout);
        Console.WriteLine("");
        Console.WriteLine("   LEVEL_MAX");
        Console.WriteLine("");

        for (int level_max = level_max_min; level_max <= level_max_max; level_max++)
        {
            cout = "    " + level_max.ToString().PadLeft(4);
            for (int dim_num = dim_min; dim_num <= dim_max; dim_num++)
            {
                int point_num = SparseCount.gp_se_size(dim_num, level_max);
                cout += "  " + point_num.ToString().PadLeft(10);
            }

            Console.WriteLine(cout);
        }
    }
示例#2
0
    private static void test10(int dim_min, int dim_max, int level_max_min, int level_max_max)
//****************************************************************************80
//
//  Purpose:
//
//    TEST10 tests OWN_O_SIZE.
//
//  Licensing:
//
//    This code is distributed under the GNU LGPL license.
//
//  Modified:
//
//    25 April 2014
//
//  Author:
//
//    John Burkardt
//
//  Parameters:
//
//    Input, int DIM_MIN, the minimum spatial dimension to consider.
//
//    Input, int DIM_MAX, the maximum spatial dimension to consider.
//
//    Input, int LEVEL_MAX_MIN, the minimum value of LEVEL_MAX to consider.
//
//    Input, int LEVEL_MAX_MAX, the maximum value of LEVEL_MAX to consider.
//
    {
        int dim_num;
        int level_max;

        Console.WriteLine("");
        Console.WriteLine("TEST10");
        Console.WriteLine("  OWN_O_SIZE returns the number of ");
        Console.WriteLine("  distinct points in an OWN_O sparse grid made from ");
        Console.WriteLine("  product grids formed from open weakly nested ");
        Console.WriteLine("  quadrature rules with odd growth, including:");
        Console.WriteLine("  * GGH_L, the Generalized Gauss-Hermite Odd Growth Family;");
        Console.WriteLine("  * GH_L, the Gauss-Hermite Odd Growth Family;");
        Console.WriteLine("  * LG_L, the Gauss-Legendre Odd Growth Family;");
        Console.WriteLine("");
        string cout = "   DIM: ";

        for (dim_num = dim_min; dim_num <= dim_max; dim_num++)
        {
            cout += "  " + dim_num.ToString().PadLeft(10);
        }

        Console.WriteLine(cout);
        Console.WriteLine("");
        Console.WriteLine("   LEVEL_MAX");
        Console.WriteLine("");

        for (level_max = level_max_min; level_max <= level_max_max; level_max++)
        {
            cout = "    " + level_max.ToString().PadLeft(4);
            for (dim_num = dim_min; dim_num <= dim_max; dim_num++)
            {
                int point_num = SparseCount.own_o_size(dim_num, level_max);
                cout += "  " + point_num.ToString().PadLeft(10);
            }

            Console.WriteLine(cout);
        }
    }
示例#3
0
    private static void test07(int dim_min, int dim_max, int level_max_min, int level_max_max)
//****************************************************************************80
//
//  Purpose:
//
//    TEST07 tests ONN_L_SIZE.
//
//  Licensing:
//
//    This code is distributed under the GNU LGPL license.
//
//  Modified:
//
//    15 January 2010
//
//  Author:
//
//    John Burkardt
//
//  Parameters:
//
//    Input, int DIM_MIN, the minimum spatial dimension to consider.
//
//    Input, int DIM_MAX, the maximum spatial dimension to consider.
//
//    Input, int LEVEL_MAX_MIN, the minimum value of LEVEL_MAX to consider.
//
//    Input, int LEVEL_MAX_MAX, the maximum value of LEVEL_MAX to consider.
//
    {
        Console.WriteLine("");
        Console.WriteLine("TEST07");
        Console.WriteLine("  ONN_L_SIZE returns the number of ");
        Console.WriteLine("  distinct points in an ONN_L sparse grid made from ");
        Console.WriteLine("  product grids formed from open non-nested ");
        Console.WriteLine("  quadrature rules with linear growth, including:");
        Console.WriteLine("  * LG_L, the Gauss Laguerre Linear Growth Family;");
        Console.WriteLine("  * GJ_L, the Gauss Jacobi Linear Growth Family;");
        Console.WriteLine("  * GLG_L, the Generalized Gauss Laguerre Linear Growth Family;");
        Console.WriteLine("  * GW_L, any Golub Welsch Linear Growth Family;");
        Console.WriteLine("");
        string cout = "   DIM: ";

        for (int dim_num = dim_min; dim_num <= dim_max; dim_num++)
        {
            cout += "  " + dim_num.ToString().PadLeft(10);
        }

        Console.WriteLine(cout);
        Console.WriteLine("");
        Console.WriteLine("   LEVEL_MAX");
        Console.WriteLine("");

        for (int level_max = level_max_min; level_max <= level_max_max; level_max++)
        {
            cout = "    " + level_max.ToString().PadLeft(4);
            for (int dim_num = dim_min; dim_num <= dim_max; dim_num++)
            {
                int point_num = SparseCount.onn_l_size(dim_num, level_max);
                cout += "  " + point_num.ToString().PadLeft(10);
            }

            Console.WriteLine(cout);
        }
    }
示例#4
0
    private static void test05(int dim_min, int dim_max, int level_max_min, int level_max_max)
//****************************************************************************80
//
//  Purpose:
//
//    TEST05 tests OFN_E_SIZE.
//
//  Licensing:
//
//    This code is distributed under the GNU LGPL license.
//
//  Modified:
//
//    15 January 2010
//
//  Author:
//
//    John Burkardt
//
//  Parameters:
//
//    Input, int DIM_MIN, the minimum spatial dimension to consider.
//
//    Input, int DIM_MAX, the maximum spatial dimension to consider.
//
//    Input, int LEVEL_MAX_MIN, the minimum value of LEVEL_MAX to consider.
//
//    Input, int LEVEL_MAX_MAX, the maximum value of LEVEL_MAX to consider.
//
    {
        Console.WriteLine("");
        Console.WriteLine("TEST05");
        Console.WriteLine("  OFN_E_SIZE returns the number of ");
        Console.WriteLine("  distinct points in an OFN_E sparse grid made from ");
        Console.WriteLine("  product grids formed from open fully nested ");
        Console.WriteLine("  quadrature rules with Exponential Growth, including");
        Console.WriteLine("  * F2_E, the Fejer Type 2 Exponential Growth Family;");
        Console.WriteLine("  * GP_E, the Gauss Patterson Exponential Growth Family;");
        Console.WriteLine("  * NCO_E, the Newton Cotes Open Exponential Growth Family.");
        Console.WriteLine("");
        string cout = "   DIM: ";

        for (int dim_num = dim_min; dim_num <= dim_max; dim_num++)
        {
            cout += "  " + dim_num.ToString().PadLeft(10);
        }

        Console.WriteLine(cout);
        Console.WriteLine("");
        Console.WriteLine("   LEVEL_MAX");
        Console.WriteLine("");

        for (int level_max = level_max_min; level_max <= level_max_max; level_max++)
        {
            cout = "    " + level_max.ToString().PadLeft(4);
            for (int dim_num = dim_min; dim_num <= dim_max; dim_num++)
            {
                int point_num = SparseCount.ofn_e_size(dim_num, level_max);
                cout += "  " + point_num.ToString().PadLeft(10);
            }

            Console.WriteLine(cout);
        }
    }
示例#5
0
    private static void test02(int dim_min, int dim_max, int level_max_min, int level_max_max)
//****************************************************************************80
//
//  Purpose:
//
//    TEST02 tests CFN_E_SIZE.
//
//  Licensing:
//
//    This code is distributed under the GNU LGPL license.
//
//  Modified:
//
//    15 January 2010
//
//  Author:
//
//    John Burkardt
//
//  Parameters:
//
//    Input, int DIM_MIN, the minimum spatial dimension to consider.
//
//    Input, int DIM_MAX, the maximum spatial dimension to consider.
//
//    Input, int LEVEL_MAX_MIN, the minimum value of LEVEL_MAX to consider.
//
//    Input, int LEVEL_MAX_MAX, the maximum value of LEVEL_MAX to consider.
//
    {
        Console.WriteLine("");
        Console.WriteLine("TEST02");
        Console.WriteLine("  CFN_E_SIZE returns the number of ");
        Console.WriteLine("  distinct points in a CFN_E sparse grid made from ");
        Console.WriteLine("  any closed fully nested family of 1D quadrature");
        Console.WriteLine("  rules with exponential growth, including:");
        Console.WriteLine("  * CC_E, the Clenshaw Curtis Exponential Growth family;");
        Console.WriteLine("  * NCC_E, the Newton Cotes Closed Exponential Growth family.");
        Console.WriteLine("");
        string cout = "   DIM: ";

        for (int dim_num = dim_min; dim_num <= dim_max; dim_num++)
        {
            cout += "  " + dim_num.ToString().PadLeft(10);
        }

        Console.WriteLine(cout);
        Console.WriteLine("");
        Console.WriteLine("   LEVEL_MAX");
        Console.WriteLine("");

        for (int level_max = level_max_min; level_max <= level_max_max; level_max++)
        {
            cout = "    " + level_max.ToString().PadLeft(4);
            for (int dim_num = dim_min; dim_num <= dim_max; dim_num++)
            {
                int point_num = SparseCount.cfn_e_size(dim_num, level_max);
                cout += "  " + point_num.ToString().PadLeft(10);
            }

            Console.WriteLine(cout);
        }
    }