OSspecific: Removed unused random generator functions

This commit is contained in:
Will Bainbridge
2018-06-08 08:51:36 +01:00
parent 002e7d7b06
commit b06ab58a18
2 changed files with 0 additions and 51 deletions

View File

@ -59,14 +59,6 @@ Description
#include <netinet/in.h>
#ifdef USE_RANDOM
#include <climits>
#if INT_MAX != 2147483647
#error "INT_MAX != 2147483647"
#error "The random number generator may not work!"
#endif
#endif
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
@ -1351,34 +1343,4 @@ Foam::fileNameList Foam::dlLoaded()
}
void Foam::osRandomSeed(const label seed)
{
#ifdef USE_RANDOM
srandom((unsigned int)seed);
#else
srand48(seed);
#endif
}
Foam::label Foam::osRandomInteger()
{
#ifdef USE_RANDOM
return random();
#else
return lrand48();
#endif
}
Foam::scalar Foam::osRandomDouble()
{
#ifdef USE_RANDOM
return (scalar)random()/INT_MAX;
#else
return drand48();
#endif
}
// ************************************************************************* //

View File

@ -199,19 +199,6 @@ bool dlSymFound(void* handle, const std::string& symbol);
//- Return all loaded libraries
fileNameList dlLoaded();
// Low level random numbers. Use Random class instead.
//- Seed random number generator.
void osRandomSeed(const label seed);
//- Return random integer (uniform distribution between 0 and 2^31)
label osRandomInteger();
//- Return random double precision (uniform distribution between 0 and 1)
scalar osRandomDouble();
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam