--- trunk/mdtools/md_code/randomSPRNG.cpp 2002/12/29 19:12:06 219 +++ trunk/mdtools/md_code/randomSPRNG.cpp 2002/12/30 16:20:42 220 @@ -5,8 +5,38 @@ randomSPRNG::randomSPRNG(){ #include "simError.h" -randomSPRNG::randomSPRNG(){ +/* randomStreamSPRNF creates a new SPRNG stream for random numbers + */ +int ranStreamSPRNG::nSPRNGStreams; +randomStreamSPRNG::randomStreamSPRNG(){ +#ifdef IS_MPI + + +#else + nSPRNGStreams++; + + myStreamNumber = nSPRNGStreams; + + thisStream = init_sprng(GTYPE,streamnum,nstreams,SEED,SPRNG_DEFAULT); + + +#endif } + +randomStreamSPRNG::~randomStreamSPRNG(){ + + free_sprng(int *thisStream); + nSPRNGStreams--; + + +} + + +double getRanStreamSPRNG(){ + double ranNum; + nanNum = sprng(thisStream); + return ranNum; +}