00001 // -*- C++ -*- 00002 /*************************************************************************** 00003 * 00004 * The IPPL Framework 00005 * 00006 * 00007 * Visit http://people.web.psi.ch/adelmann/ for more details 00008 * 00009 ***************************************************************************/ 00010 00011 #ifndef RANDOM_NUMBER_GEN_H 00012 #define RANDOM_NUMBER_GEN_H 00013 00014 /*********************************************************************** 00015 * 00016 * class RandomNumberGen 00017 * 00018 * RandomNumberGen is actually just a typedef for one of the many 00019 * RNGSequence classes available in IPPL. It is selected by examining the 00020 * values of #define's. Other RNGSequence classes may be used in a program, 00021 * but using RandomNumberGen give you the 'default' RNGSequence type as 00022 * selected at compile time. 00023 * 00024 * When using Random or Distributed number sequences, include this file. 00025 * 00026 ***********************************************************************/ 00027 00028 // include files 00029 #include "Utility/RNGRand.h" 00030 #include "Utility/RNGSimple.h" 00031 #include "Utility/RNGXDiv.h" 00032 #include "Utility/RNGXCI.h" 00033 00034 // typedef for the default RNG ... selected by #define 00035 #if defined(IPPL_USE_XDIV_RNG) 00036 typedef RNGXDivSequence RandomNumberGen; 00037 #elif defined(IPPL_USE_RAND_RNG) 00038 typedef RNGRandSequence RandomNumberGen; 00039 #elif defined(IPPL_USE_SIMPLE_RNG) 00040 typedef RNGSimpleSequence RandomNumberGen; 00041 #elif defined(IPPL_USE_XCI_RNG) 00042 typedef RNGXCISequence RandomNumberGen; 00043 #else 00044 typedef RNGSimpleSequence RandomNumberGen; 00045 #endif 00046 00047 00048 // a default RandomNumberGen object for use in the Framework. When 00049 // running in parallel, the Ippl object will advance this by the 00050 // node number so as to have different RNG sequences on each node. If the 00051 // same RNG sequence is needed on each node, the user must instantiate their 00052 // own RNG sequence object and use that. 00053 extern RandomNumberGen IpplRandom; 00054 00055 00056 #endif // RANDOM_NUMBER_GEN_H 00057 00058 /*************************************************************************** 00059 * $RCSfile: RandomNumberGen.h,v $ $Author: adelmann $ 00060 * $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:33 $ 00061 * IPPL_VERSION_ID: $Id: RandomNumberGen.h,v 1.1.1.1 2003/01/23 07:40:33 adelmann Exp $ 00062 ***************************************************************************/