File tree Expand file tree Collapse file tree 3 files changed +3
-20
lines changed Expand file tree Collapse file tree 3 files changed +3
-20
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,6 @@ cmake_dependent_option(
2222option (pfasst_BUILD_TESTS "Build test suite for PFASST." ON )
2323option (pfasst_WITH_MPI "Build with MPI enabled." ON )
2424option (pfasst_WITH_GCC_PROF "Enable excessive debugging & profiling output with GCC." OFF )
25- option (pfasst_DEFAULT_RAND_SEED "Using a hardcoded random seed" ON )
2625cmake_dependent_option(
2726 enable_LTO "enable LinkTimeOptimization" OFF
2827 "CMAKE_BUILD_TYPE" Release)
@@ -43,10 +42,6 @@ if(${pfasst_WITH_MPI})
4342 add_definitions (-DWITH_MPI)
4443endif ()
4544
46- if (pfasst_DEFAULT_RAND_SEED)
47- set (pfasst_RANDOM_SEED "42" )
48- endif ()
49-
5045# Check for C++11 support
5146if (${CMAKE_CXX_COMPILER_ID} MATCHES GNU)
5247 check_cxx_compiler_flag(-std=c++11 HAVE_STD11)
@@ -129,12 +124,6 @@ if(${CMAKE_CXX_COMPILER_ID} MATCHES GNU)
129124 "build-in profiling support"
130125 )
131126endif ()
132- if (pfasst_RANDOM_SEED)
133- add_feature_info(DefaultRandomSeed
134- pfasst_RANDOM_SEED
135- "using specific default random seed ${pfasst_RANDOM_SEED} "
136- )
137- endif ()
138127
139128set (3rdparty_INCLUDES)
140129set (3rdparty_DEPENDEND_LIBS)
Original file line number Diff line number Diff line change 33#ifndef _PFASST__SITE_CONFIG_HPP
44#define _PFASST__SITE_CONFIG_HPP
55
6- #ifdef PFASST_DEFAULT_RANDOM_SEED
7- #define PFASST_RANDOM_SEED @pfasst_RANDOM_SEED@
8- #endif
9-
106#include <string>
117using namespace std;
128
Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ using namespace std;
1818
1919#include " particle_util.hpp"
2020
21+ #define PFASST_RANDOM_SEED 42
22+
2123
2224namespace pfasst
2325{
@@ -280,11 +282,7 @@ namespace pfasst
280282
281283 precision scale = 1000.0 ;
282284
283- #ifdef PFASST_DEFAULT_RANDOM_SEED
284- default_random_engine rd_gen (PFASST_RANDOM_SEED);
285- #else
286- default_random_engine rd_gen ();
287- #endif
285+ default_random_engine rd_gen (PFASST_RANDOM_SEED);
288286 precision max_pos = max (center->pos ());
289287 precision max_vel = max (center->vel ());
290288 uniform_real_distribution<precision> dist_pos (- max_pos / scale, max_pos / scale);
You can’t perform that action at this time.
0 commit comments