Commit 98503a56 authored by cianciosa's avatar cianciosa
Browse files

Preparations at test against gold data. WIP

parent a282f181
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@ add_test (
                                                      --init_w_dist=normal
                                                      --init_w_mean=700
                                                      --init_w_sigma=10.0
                                                      --init_x_mean=1.0
                                                      --init_x_mean=2.5
                                                      --init_y_dist=normal
                                                      --init_y_mean=0.0
                                                      --init_y_sigma=0.05
@@ -29,4 +29,5 @@ add_test (
                                                      --solver=rk4
                                                      --sub_steps=100
                                                      --use_cyl_xy
                                                      --seed
)
+7 −4
Original line number Diff line number Diff line
@@ -101,8 +101,10 @@ void set_xy_variables(const commandline::parser &cl,
                const T phi_sigma = cl.get_option_value<T> ("init_y_sigma");
                auto phi_dist = set_distribution(phi_mean, phi_sigma);
                for (size_t i = 0; i < num_rays; i++) {
                    x->set(i, static_cast<T> (radius_dist(engine))*cos(static_cast<T> (phi_dist(engine))));
                    y->set(i, static_cast<T> (radius_dist(engine))*sin(static_cast<T> (phi_dist(engine))));
                    const T r = static_cast<T> (phi_dist(engine));
                    const T phi = static_cast<T> (phi_dist(engine));
                    x->set(i, r*cos(phi));
                    y->set(i, r*sin(phi));
                }
            } else {
                for (size_t i = 0; i < num_rays; i++) {
@@ -116,8 +118,9 @@ void set_xy_variables(const commandline::parser &cl,
                const T phi_sigma = cl.get_option_value<T> ("init_y_sigma");
                auto phi_dist = set_distribution(phi_mean, phi_sigma);
                for (size_t i = 0; i < num_rays; i++) {
                    x->set(i, radius_mean*cos(static_cast<T> (phi_dist(engine))));
                    y->set(i, radius_mean*sin(static_cast<T> (phi_dist(engine))));
                    const T phi = static_cast<T> (phi_dist(engine));
                    x->set(i, radius_mean*cos(phi));
                    y->set(i, radius_mean*sin(phi));
                }
            } else {
                for (size_t i = 0; i < num_rays; i++) {
+2 −0
Original line number Diff line number Diff line
@@ -322,6 +322,7 @@
		C7B677DA29E464AE00D3ADC6 /* cpu_context.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = cpu_context.hpp; sourceTree = "<group>"; };
		C7CEA0042948D02A00F61D09 /* timing.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = timing.hpp; sourceTree = "<group>"; };
		C7CEA0052948EB0F00F61D09 /* cuda_context.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = cuda_context.hpp; sourceTree = "<group>"; };
		C7D3C5B02C654AD3008AD8C6 /* efit_test.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; path = efit_test.cpp; sourceTree = "<group>"; };
		C7E134492A3CB3EC0083F6A7 /* output.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = output.hpp; sourceTree = "<group>"; };
		C7E5643E28A2A16F000F31A2 /* backend_test */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = backend_test; sourceTree = BUILT_PRODUCTS_DIR; };
		C7E5644A28A2A1C5000F31A2 /* dispersion_test */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = dispersion_test; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -569,6 +570,7 @@
				C7931E6A28073BCA0033B488 /* CMakeLists.txt */,
				C736902B2A38AC0E001733B0 /* erfi_test.cpp */,
				C7931E7328074F540033B488 /* backend_test.cpp */,
				C7D3C5B02C654AD3008AD8C6 /* efit_test.cpp */,
				C7931E6B28073BCA0033B488 /* dispersion_test.cpp */,
				C7931E6C28073BCA0033B488 /* solver_test.cpp */,
				C7931E6D28073BCA0033B488 /* arithmetic_test.cpp */,
+5 −1
Original line number Diff line number Diff line
@@ -64,6 +64,10 @@
            argument = "--num_rays=1"
            isEnabled = "YES">
         </CommandLineArgument>
         <CommandLineArgument
            argument = "--seed"
            isEnabled = "YES">
         </CommandLineArgument>
         <CommandLineArgument
            argument = "--num_times=100000"
            isEnabled = "YES">
@@ -133,7 +137,7 @@
            isEnabled = "YES">
         </CommandLineArgument>
         <CommandLineArgument
            argument = "--init_x_mean=1.0"
            argument = "--init_x_mean=2.5"
            isEnabled = "YES">
         </CommandLineArgument>
         <CommandLineArgument
+21 −1
Original line number Diff line number Diff line
@@ -563,7 +563,11 @@ namespace graph {
                return leaf_node<T, SAFE_MATH>::cache[i];
            }
        }
#if defined(__clang__) || defined(__GNUC__)
        __builtin_unreachable();
#else
        assert(false && "Should never reach.");
#endif
    }

//------------------------------------------------------------------------------
@@ -1158,7 +1162,11 @@ namespace graph {
                return leaf_node<T, SAFE_MATH>::cache[i];
            }
        }
#if defined(__clang__) || defined(__GNUC__)
        __builtin_unreachable();
#else
        assert(false && "Should never reach.");
#endif
    }

//------------------------------------------------------------------------------
@@ -1950,7 +1958,11 @@ namespace graph {
                return leaf_node<T, SAFE_MATH>::cache[i];
            }
        }
#if defined(__clang__) || defined(__GNUC__)
        __builtin_unreachable();
#else
        assert(false && "Should never reach.");
#endif
    }

//------------------------------------------------------------------------------
@@ -2531,7 +2543,11 @@ namespace graph {
                return leaf_node<T, SAFE_MATH>::cache[i];
            }
        }
#if defined(__clang__) || defined(__GNUC__)
        __builtin_unreachable();
#else
        assert(false && "Should never reach.");
#endif
    }

//------------------------------------------------------------------------------
@@ -3852,7 +3868,11 @@ namespace graph {
                return leaf_node<T, SAFE_MATH>::cache[i];
            }
        }
#if defined(__clang__) || defined(__GNUC__)
        __builtin_unreachable();
#else
        assert(false && "Should never reach.");
#endif
    }

///  Convenience type alias for shared add nodes.
Loading