Esempio n. 1
0
            options["matrix_ratio"] = 2
            options["n_cpu"] = 0
            options["error_norm"] = "relative"
            options["error_type"] = "nrmsd"
            options["projection_qoi"] = 0
            options["n_grid_gradient"] = 25
            options["gradient_calculation"] = "standard_forward"
            options["gradient_enhanced"] = g_e

            options["fn_results"] = os.path.join(
                folder, "TestBenchContinuous/{}_{}_q_{}_ge_{}".format(
                    algorithm.__name__, options["solver"],
                    options["order_max_norm"], int(g_e)))
            TestBenchContinuous = pygpc.TestBenchContinuous(
                algorithm=algorithm,
                options=copy.deepcopy(options),
                repetitions=repetitions,
                n_cpu=n_cpu)
            TestBenchContinuous.run()

            # options["fn_results"] = os.path.join(folder, "TestBenchContinuousND/{}_{}_q_{}_ge_{}".format(
            #     algorithm.__name__, options["solver"], options["order_max_norm"], int(g_e)))
            # TestBenchContinuousND = pygpc.TestBenchContinuousND(algorithm=algorithm,
            #                                                     options=copy.deepcopy(options),
            #                                                     repetitions=repetitions,
            #                                                     dims=dims,
            #                                                     n_cpu=n_cpu)
            # TestBenchContinuousND.run()
            #
            # if o < 7:
            #     options["fn_results"] = os.path.join(folder, "TestBenchContinuousHD/{}_{}_q_{}_ge_{}".format(
            options["solver"] = "Moore-Penrose"
            options["order_max_norm"] = o
            options["settings"] = None
            options["matrix_ratio"] = 2
            options["n_cpu"] = 0
            options["eps"] = 1e-3
            options["error_norm"] = "relative"
            options["error_type"] = "nrmsd"
            options["adaptive_sampling"] = a_s
            options["gradient_enhanced"] = g_e
            options["gradient_calculation"] = "standard_forward"

            options["fn_results"] = os.path.join(folder, "TestBenchContinuous/{}_{}_q_{}_as_{}_ge_{}".format(
                algorithm.__name__, options["solver"], options["order_max_norm"], int(a_s), int(g_e)))
            TestBenchContinuous = pygpc.TestBenchContinuous(algorithm=algorithm,
                                                            options=options,
                                                            repetitions=repetitions,
                                                            n_cpu=n_cpu)
            TestBenchContinuous.run()

            # options["fn_results"] = os.path.join(folder, "TestBenchContinuousND/{}_{}_q_{}_as_{}_ge_{}".format(
            #     algorithm.__name__, options["solver"], options["order_max_norm"], int(a_s), int(g_e)))
            # TestBenchContinuousND = pygpc.TestBenchContinuousND(algorithm=algorithm,
            #                                                     options=copy.deepcopy(options),
            #                                                     repetitions=repetitions,
            #                                                     dims=dims,
            #                                                     n_cpu=n_cpu)
            # TestBenchContinuousND.run()
            #
            # options["fn_results"] = os.path.join(folder, "TestBenchDiscontinuous/{}_{}_q_{}_as_{}_ge_{}".format(
            #     algorithm.__name__, options["solver"], options["order_max_norm"], int(a_s), int(g_e)))
            # TestBenchDiscontinuous = pygpc.TestBenchDiscontinuous(algorithm=algorithm,