OpenMD  2.5
Molecular Dynamics in the Open
OpenMD::ParallelRandNumGen Class Reference

a parallel random number generator More...

#include <ParallelRandNumGen.hpp>

Inheritance diagram for OpenMD::ParallelRandNumGen:

Public Types

typedef unsigned long uint32
- Public Types inherited from OpenMD::RandNumGen
typedef unsigned long uint32

Public Member Functions

 ParallelRandNumGen (const uint32 &oneSeed)
 ParallelRandNumGen ()
virtual void seed (const uint32 oneSeed)
virtual void seed ()
- Public Member Functions inherited from OpenMD::RandNumGen
virtual ~RandNumGen ()
RealType rand ()
RealType rand (const RealType &n)
RealType randExc ()
RealType randExc (const RealType &n)
RealType randDblExc ()
RealType randDblExc (const RealType &n)
uint32 randInt ()
uint32 randInt (const uint32 &n)
RealType rand53 ()
RealType randNorm (const RealType mean, const RealType variance)

Private Member Functions

 ParallelRandNumGen (const ParallelRandNumGen &)
ParallelRandNumGenoperator= (const ParallelRandNumGen &)

Private Attributes

int myRank_

Static Private Attributes

static int nCreatedRNG_ = 0

Additional Inherited Members

- Protected Attributes inherited from OpenMD::RandNumGen

Detailed Description

a parallel random number generator

use SeqRandNumGen if you want a non-parallel random number generator.

Definition at line 59 of file ParallelRandNumGen.hpp.

Member Typedef Documentation

◆ uint32

typedef unsigned long OpenMD::ParallelRandNumGen::uint32

Definition at line 61 of file ParallelRandNumGen.hpp.

Constructor & Destructor Documentation

◆ ParallelRandNumGen() [1/3]

OpenMD::ParallelRandNumGen::ParallelRandNumGen ( const uint32 oneSeed)

◆ ParallelRandNumGen() [2/3]

OpenMD::ParallelRandNumGen::ParallelRandNumGen ( )
calling virtual function in constructor is not a good design

Definition at line 87 of file ParallelRandNumGen.cpp.

References OpenMD::RandNumGen::mtRand_, myRank_, and seed().

◆ ParallelRandNumGen() [3/3]

OpenMD::ParallelRandNumGen::ParallelRandNumGen ( const ParallelRandNumGen )

Member Function Documentation

◆ operator=()

ParallelRandNumGen& OpenMD::ParallelRandNumGen::operator= ( const ParallelRandNumGen )

◆ seed() [1/2]

void OpenMD::ParallelRandNumGen::seed ( const uint32  oneSeed)

◆ seed() [2/2]

void OpenMD::ParallelRandNumGen::seed ( )

Member Data Documentation

◆ myRank_

int OpenMD::ParallelRandNumGen::myRank_

Definition at line 78 of file ParallelRandNumGen.hpp.

Referenced by ParallelRandNumGen().

◆ nCreatedRNG_

int OpenMD::ParallelRandNumGen::nCreatedRNG_ = 0

number of random number generators created

Definition at line 76 of file ParallelRandNumGen.hpp.

Referenced by ParallelRandNumGen(), and seed().

The documentation for this class was generated from the following files: