Changeset 3615 in Sophya for trunk/Cosmo/SimLSS/cmvobserv3d.cc


Ignore:
Timestamp:
May 1, 2009, 1:34:31 PM (16 years ago)
Author:
cmv
Message:

Modifs relatives a l'introduction de RandomGeneratorInterface + delete de srandgen.c, cmv 01/05/2009

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cosmo/SimLSS/cmvobserv3d.cc

    r3594 r3615  
    77#include <math.h>
    88#include <unistd.h>
     9#include "sophyainit.h"
    910#include "timing.h"
    1011#include "ntuple.h"
    1112#include "matharr.h"
     13#include "randfmt.h"
     14//#include "randr48.h"
     15#include "srandgen.h"
    1216
    1317#include "constcosmo.h"
     
    7175int main(int narg,char *arg[])
    7276{
     77 SophyaInit();
    7378 InitTim();
    7479
     
    146151 system("date -u");
    147152
     153 // --- Choix du generateur aleatoire (a faire ICI imperativement avant AutoInitRand)
     154 FMTRandGen *RandGen = new FMTRandGen;
     155 RandGen->SelectGaussianAlgo(C_Gaussian_RandLibSNorm);
     156 RandGen->SelectPoissonAlgo(C_Poisson_Ahrens);
     157 RandomGeneratorInterface::SetGlobalRandGenP(RandGen);
     158 
     159 // --- Decodage des arguments
    148160 char c;
    149161 while((c = getopt(narg,arg,"ha0PWSV2U:G:F:x:y:z:s:Z:M:A:T:N:Q:R:8:O:o:")) != -1) {
     
    151163  switch (c) {
    152164  case 'a' :
    153     Auto_Ini_Ranf(5);
     165    AutoInitRand(5);
    154166    break;
    155167  case '0' :
     
    262274     <<whattowrt[4]<<endl;
    263275 cout<<"rootnameout="<<rootnameout<<endl;
     276 ShowRandom();
     277 cout<<"   First random is: "<<drand01()<<endl;
    264278
    265279 string tagobs = rootnameout + ".ppf";
     
    772786 }
    773787
     788 //-----------------------------------------------------------------
     789 delete RandGen;
    774790 PrtTim(">>>> End Of Job");
     791
    775792 return 0;
    776793}
Note: See TracChangeset for help on using the changeset viewer.