ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/mdtools/md_code/randomSPRNG.cpp
(Generate patch)

Comparing trunk/mdtools/md_code/randomSPRNG.cpp (file contents):
Revision 219 by chuckv, Sun Dec 29 19:12:06 2002 UTC vs.
Revision 220 by chuckv, Mon Dec 30 16:20:42 2002 UTC

# Line 5 | Line 5 | randomSPRNG::randomSPRNG(){
5   #include "simError.h"
6  
7  
8 < randomSPRNG::randomSPRNG(){
8 > /* randomStreamSPRNF creates a new SPRNG stream for random numbers
9 > */
10  
11 + int ranStreamSPRNG::nSPRNGStreams;
12  
13 + randomStreamSPRNG::randomStreamSPRNG(){
14 + #ifdef IS_MPI
15  
16 +  
17 +
18 + #else
19 +  nSPRNGStreams++;
20 +
21 +  myStreamNumber = nSPRNGStreams;
22 +
23 +  thisStream = init_sprng(GTYPE,streamnum,nstreams,SEED,SPRNG_DEFAULT);
24 +
25 +
26 + #endif
27   }
28 +
29 + randomStreamSPRNG::~randomStreamSPRNG(){
30 +
31 +  free_sprng(int *thisStream);
32 +  nSPRNGStreams--;
33 +
34 +
35 + }
36 +
37 +
38 + double getRanStreamSPRNG(){
39 +  double ranNum;
40 +  nanNum = sprng(thisStream);
41 +  return ranNum;
42 + }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines