source: issm/oecreview/Archive/25834-26739/ISSM-26579-26580.diff

Last change on this file was 26740, checked in by Mathieu Morlighem, 3 years ago

CHG: added 25834-26739

File size: 1.3 KB
  • ../trunk-jpl/src/c/solutionsequences/solutionsequence_sampling.cpp

     
    1717        double      rdnumber;
    1818
    1919        /*Define seed*/
    20         normal_distribution_rnd distribution;
     20        //normal_distribution_rnd distribution;
    2121        if(seed<0){
    2222                std::random_device rd;
    2323                seed = rd();
     
    2828                ISSM_MPI_Comm_rank(ISSM_MPI_COMM_WORLD,&my_rank);
    2929                seed = seed + 783728*my_rank; // change default seed for parallel simulations (by considering an arbitrary shif based on the rank number)
    3030        }
    31         distribution.seed(seed);
     31        //distribution.seed(seed);
    3232
    3333        int        *local_indices = NULL;
    3434        IssmDouble *local_vector = NULL;
     
    3737  int M;
    3838        ppf->GetLocalSize(&M);
    3939        for(int i=0;i<M;i++){
    40                 rdnumber = distribution.generator();
     40                rdnumber = 1.0;//distribution.generator();
    4141                ppf->SetValue(local_indices[i],rdnumber,INS_VAL);
    4242        }
    4343        ppf->Assemble();
Note: See TracBrowser for help on using the repository browser.