source:
issm/oecreview/Archive/25834-26739/ISSM-26579-26580.diff@
26740
Last change on this file since 26740 was 26740, checked in by , 3 years ago | |
---|---|
File size: 1.3 KB |
-
../trunk-jpl/src/c/solutionsequences/solutionsequence_sampling.cpp
17 17 double rdnumber; 18 18 19 19 /*Define seed*/ 20 normal_distribution_rnd distribution;20 //normal_distribution_rnd distribution; 21 21 if(seed<0){ 22 22 std::random_device rd; 23 23 seed = rd(); … … 28 28 ISSM_MPI_Comm_rank(ISSM_MPI_COMM_WORLD,&my_rank); 29 29 seed = seed + 783728*my_rank; // change default seed for parallel simulations (by considering an arbitrary shif based on the rank number) 30 30 } 31 distribution.seed(seed);31 //distribution.seed(seed); 32 32 33 33 int *local_indices = NULL; 34 34 IssmDouble *local_vector = NULL; … … 37 37 int M; 38 38 ppf->GetLocalSize(&M); 39 39 for(int i=0;i<M;i++){ 40 rdnumber = distribution.generator();40 rdnumber = 1.0;//distribution.generator(); 41 41 ppf->SetValue(local_indices[i],rdnumber,INS_VAL); 42 42 } 43 43 ppf->Assemble();
Note:
See TracBrowser
for help on using the repository browser.