diff --git a/applications/modules/isothermalFilm/fvModels/filmCloudTransfer/cloudFilmTransfer/CloudFilmTransfer/CloudFilmTransfer.H b/applications/modules/isothermalFilm/fvModels/filmCloudTransfer/cloudFilmTransfer/CloudFilmTransfer/CloudFilmTransfer.H index e309916b50..85bbbe5c20 100644 --- a/applications/modules/isothermalFilm/fvModels/filmCloudTransfer/cloudFilmTransfer/CloudFilmTransfer/CloudFilmTransfer.H +++ b/applications/modules/isothermalFilm/fvModels/filmCloudTransfer/cloudFilmTransfer/CloudFilmTransfer/CloudFilmTransfer.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -58,7 +58,7 @@ namespace Foam { // Forward declaration of classes -class Random; +class randomGenerator; namespace fv { @@ -111,7 +111,7 @@ protected: typedef typename CloudType::parcelType parcelType; //- Reference to the cloud random number generator - Random& rndGen_; + randomGenerator& rndGen_; // Film models diff --git a/applications/modules/isothermalFilm/fvModels/filmCloudTransfer/ejectionModels/dripping/dripping.H b/applications/modules/isothermalFilm/fvModels/filmCloudTransfer/ejectionModels/dripping/dripping.H index 8504622191..b5255364e2 100644 --- a/applications/modules/isothermalFilm/fvModels/filmCloudTransfer/ejectionModels/dripping/dripping.H +++ b/applications/modules/isothermalFilm/fvModels/filmCloudTransfer/ejectionModels/dripping/dripping.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -70,7 +70,7 @@ SourceFiles #include "ejectionModel.H" #include "distribution.H" -#include "Random.H" +#include "randomGenerator.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -97,7 +97,7 @@ class dripping scalar minParticlesPerParcel_; //- Random number generator - Random rndGen_; + randomGenerator rndGen_; //- Parcel size PDF model const autoPtr parcelDistribution_; diff --git a/applications/test/BinSum/Test-BinSum.C b/applications/test/BinSum/Test-BinSum.C index 1e2bfa0572..01b1ff6767 100644 --- a/applications/test/BinSum/Test-BinSum.C +++ b/applications/test/BinSum/Test-BinSum.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -32,7 +32,7 @@ Description #include "List.H" #include "BinSum.H" #include "IOstreams.H" -#include "Random.H" +#include "randomGenerator.H" #include "scalarField.H" using namespace Foam; @@ -41,7 +41,7 @@ using namespace Foam; int main(int argc, char *argv[]) { - Random rndGen(0); + randomGenerator rndGen(0); scalarField samples(10000000); forAll(samples, i) diff --git a/applications/test/Polynomial/Test-Polynomial.C b/applications/test/Polynomial/Test-Polynomial.C index c013597bcb..6ceb7187fa 100644 --- a/applications/test/Polynomial/Test-Polynomial.C +++ b/applications/test/Polynomial/Test-Polynomial.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,7 +31,7 @@ Description #include "IStringStream.H" #include "Polynomial.H" -#include "Random.H" +#include "randomGenerator.H" #include "cpuTime.H" using namespace Foam; @@ -136,10 +136,10 @@ int main(int argc, char *argv[]) polyCopy = 2.5*poly; Info<< "2.5*poly = " << polyCopy << nl << endl; - Random rnd(123456); + randomGenerator rndGen(123456); for (int i=0; i<10; i++) { - scalar x = rnd.scalar01()*100; + scalar x = rndGen.scalar01()*100; scalar px = polyValue(x); scalar ipx = intPolyValue(x); diff --git a/applications/test/boundSphere/Test-boundSphere.C b/applications/test/boundSphere/Test-boundSphere.C index a5cf251b21..776800cb89 100644 --- a/applications/test/boundSphere/Test-boundSphere.C +++ b/applications/test/boundSphere/Test-boundSphere.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2022-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -75,7 +75,7 @@ int main(int argc, char *argv[]) cpuTime time; for (label testi = 0; testi < nTests; ++ testi) { - Random rndGen(seed + testi); + randomGenerator rndGen(seed + testi); // Get random points ps.resize(nPs); diff --git a/applications/test/distribution/Test-distribution.C b/applications/test/distribution/Test-distribution.C index 1a6bec68e7..f4d8a30c96 100644 --- a/applications/test/distribution/Test-distribution.C +++ b/applications/test/distribution/Test-distribution.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2023 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2023-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -60,7 +60,7 @@ int main(int argc, char *argv[]) static const label nSamples = 10000000; // Initialise the random number generator - Random rndGen(clock::getTime()); + randomGenerator rndGen(clock::getTime()); // Create a zero-size-exponent, zero-sampling-size-exponent distribution // from which to get X-coordinates diff --git a/applications/test/fieldMapping/Test-fieldMapping.C b/applications/test/fieldMapping/Test-fieldMapping.C index f86b6768c2..a393d9d6fb 100644 --- a/applications/test/fieldMapping/Test-fieldMapping.C +++ b/applications/test/fieldMapping/Test-fieldMapping.C @@ -41,7 +41,7 @@ Description #include "polyTopoChange.H" #include "fvcDiv.H" #include "zeroGradientFvPatchFields.H" -#include "Random.H" +#include "randomGenerator.H" using namespace Foam; @@ -63,7 +63,7 @@ int main(int argc, char *argv[]) timeSelector::select0(runTime, args); #include "createMesh.H" - Random rndGen(0); + randomGenerator rndGen(0); // Test mapping // ------------ diff --git a/applications/test/integerPow/Test-integerPow.C b/applications/test/integerPow/Test-integerPow.C index b6d58654d6..5561106b3b 100644 --- a/applications/test/integerPow/Test-integerPow.C +++ b/applications/test/integerPow/Test-integerPow.C @@ -1,6 +1,6 @@ #include "cpuTime.H" #include "Pair.H" -#include "Random.H" +#include "randomGenerator.H" using namespace Foam; @@ -17,7 +17,7 @@ static const label E = 4; template Pair run(Pow pow) { - Random rndGen(0); + randomGenerator rndGen(0); cpuTime time; diff --git a/applications/test/parallel-nonBlocking/Test-parallel-nonBlocking.C b/applications/test/parallel-nonBlocking/Test-parallel-nonBlocking.C index 5502de4c32..a57dd4e4ce 100644 --- a/applications/test/parallel-nonBlocking/Test-parallel-nonBlocking.C +++ b/applications/test/parallel-nonBlocking/Test-parallel-nonBlocking.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2012-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -37,7 +37,7 @@ Description #include "OPstream.H" #include "vector.H" #include "IOstreams.H" -#include "Random.H" +#include "randomGenerator.H" #include "Tuple2.H" #include "PstreamBuffers.H" diff --git a/applications/test/parallel/Test-parallel.C b/applications/test/parallel/Test-parallel.C index 0155161386..f679fefc13 100644 --- a/applications/test/parallel/Test-parallel.C +++ b/applications/test/parallel/Test-parallel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -37,7 +37,7 @@ Description #include "OPstream.H" #include "vector.H" #include "IOstreams.H" -#include "Random.H" +#include "randomGenerator.H" #include "Tuple2.H" using namespace Foam; @@ -56,7 +56,7 @@ int main(int argc, char *argv[]) if (true) { - Random rndGen(43544*Pstream::myProcNo()); + randomGenerator rndGen(43544*Pstream::myProcNo()); // Generate random data. List>> complexData(100); diff --git a/applications/test/polygonTriangulate/Test-polygonTriangulate.C b/applications/test/polygonTriangulate/Test-polygonTriangulate.C index abf769b5f2..cb11878828 100644 --- a/applications/test/polygonTriangulate/Test-polygonTriangulate.C +++ b/applications/test/polygonTriangulate/Test-polygonTriangulate.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2021-2023 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2021-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -76,7 +76,7 @@ int main(int argc, char *argv[]) Info<< "Seeding random number generator with value " << seed << nl << endl; } - Random rndGen(seed); + randomGenerator rndGen(seed); // Get controls const bool simple = args.optionFound("simple"); diff --git a/applications/test/speed/scalarSpeed/Test-scalarSpeed.C b/applications/test/speed/scalarSpeed/Test-scalarSpeed.C index ed23dd6044..709065ceaa 100644 --- a/applications/test/speed/scalarSpeed/Test-scalarSpeed.C +++ b/applications/test/speed/scalarSpeed/Test-scalarSpeed.C @@ -1,5 +1,5 @@ #include "primitiveFields.H" -#include "Random.H" +#include "randomGenerator.H" #include "cpuTime.H" #include "IOstreams.H" #include "OFstream.H" @@ -15,7 +15,7 @@ int main() const label rndAddrSkip = 40; const label redFac = 6; const label redSize = size/redFac; - Random genAddr(100); + randomGenerator rndGen(100); double* f1 = new double[size]; double* f2 = new double[size]; @@ -38,7 +38,7 @@ int main() for (label i=0; i(0, size); + addr[i] = rndGen.sampleAB