--- trunk/OOPSE-4/src/math/ParallelRandNumGen.hpp 2005/03/02 16:28:20 2077 +++ trunk/OOPSE-4/src/math/ParallelRandNumGen.hpp 2008/04/25 15:14:47 3388 @@ -1,4 +1,4 @@ - /* +/* * Copyright (c) 2005 The University of Notre Dame. All Rights Reserved. * * The University of Notre Dame grants you ("Licensee") a @@ -46,38 +46,35 @@ #include "utils/simError.h" #include "math/RandNumGen.hpp" -#ifdef IS_MPI namespace oopse { - - - -/** - * @class ParallelRandNumGen a parallel random number generator - * @note use MTRand if you want a non-parallel random number generator in MPI enviroment - */ -class ParallelRandNumGen : public RandNumGen{ - public: - typedef unsigned long uint32; - - ParallelRandNumGen( const uint32& oneSeed); - - ParallelRandNumGen(); - - virtual void seed( const uint32 oneSeed ); - - virtual void seed(); - - private: - - ParallelRandNumGen(const ParallelRandNumGen&); - ParallelRandNumGen& operator =(const ParallelRandNumGen&); - - static int nCreatedRNG_; /**< number of created random number of generator*/ - -}; - + + /** + * @class ParallelRandNumGen a parallel random number generator + * @note use SeqRandNumGen if you want a non-parallel random number + * generator. + */ + class ParallelRandNumGen : public RandNumGen{ + public: + typedef unsigned long uint32; + + ParallelRandNumGen( const uint32& oneSeed); + + ParallelRandNumGen(); + + virtual void seed( const uint32 oneSeed ); + + virtual void seed(); + + private: + + ParallelRandNumGen(const ParallelRandNumGen&); + ParallelRandNumGen& operator =(const ParallelRandNumGen&); + + static int nCreatedRNG_; /**< number of random number + generators created */ + int myRank_; + }; + } -#endif - #endif