randomGenerator: Renamed Random
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -58,7 +58,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
// Forward declaration of classes
|
// Forward declaration of classes
|
||||||
class Random;
|
class randomGenerator;
|
||||||
|
|
||||||
namespace fv
|
namespace fv
|
||||||
{
|
{
|
||||||
@ -111,7 +111,7 @@ protected:
|
|||||||
typedef typename CloudType::parcelType parcelType;
|
typedef typename CloudType::parcelType parcelType;
|
||||||
|
|
||||||
//- Reference to the cloud random number generator
|
//- Reference to the cloud random number generator
|
||||||
Random& rndGen_;
|
randomGenerator& rndGen_;
|
||||||
|
|
||||||
|
|
||||||
// Film models
|
// Film models
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -70,7 +70,7 @@ SourceFiles
|
|||||||
|
|
||||||
#include "ejectionModel.H"
|
#include "ejectionModel.H"
|
||||||
#include "distribution.H"
|
#include "distribution.H"
|
||||||
#include "Random.H"
|
#include "randomGenerator.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -97,7 +97,7 @@ class dripping
|
|||||||
scalar minParticlesPerParcel_;
|
scalar minParticlesPerParcel_;
|
||||||
|
|
||||||
//- Random number generator
|
//- Random number generator
|
||||||
Random rndGen_;
|
randomGenerator rndGen_;
|
||||||
|
|
||||||
//- Parcel size PDF model
|
//- Parcel size PDF model
|
||||||
const autoPtr<distribution> parcelDistribution_;
|
const autoPtr<distribution> parcelDistribution_;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -32,7 +32,7 @@ Description
|
|||||||
#include "List.H"
|
#include "List.H"
|
||||||
#include "BinSum.H"
|
#include "BinSum.H"
|
||||||
#include "IOstreams.H"
|
#include "IOstreams.H"
|
||||||
#include "Random.H"
|
#include "randomGenerator.H"
|
||||||
#include "scalarField.H"
|
#include "scalarField.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
@ -41,7 +41,7 @@ using namespace Foam;
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
Random rndGen(0);
|
randomGenerator rndGen(0);
|
||||||
|
|
||||||
scalarField samples(10000000);
|
scalarField samples(10000000);
|
||||||
forAll(samples, i)
|
forAll(samples, i)
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -31,7 +31,7 @@ Description
|
|||||||
|
|
||||||
#include "IStringStream.H"
|
#include "IStringStream.H"
|
||||||
#include "Polynomial.H"
|
#include "Polynomial.H"
|
||||||
#include "Random.H"
|
#include "randomGenerator.H"
|
||||||
#include "cpuTime.H"
|
#include "cpuTime.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
@ -136,10 +136,10 @@ int main(int argc, char *argv[])
|
|||||||
polyCopy = 2.5*poly;
|
polyCopy = 2.5*poly;
|
||||||
Info<< "2.5*poly = " << polyCopy << nl << endl;
|
Info<< "2.5*poly = " << polyCopy << nl << endl;
|
||||||
|
|
||||||
Random rnd(123456);
|
randomGenerator rndGen(123456);
|
||||||
for (int i=0; i<10; i++)
|
for (int i=0; i<10; i++)
|
||||||
{
|
{
|
||||||
scalar x = rnd.scalar01()*100;
|
scalar x = rndGen.scalar01()*100;
|
||||||
|
|
||||||
scalar px = polyValue(x);
|
scalar px = polyValue(x);
|
||||||
scalar ipx = intPolyValue(x);
|
scalar ipx = intPolyValue(x);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2022-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -75,7 +75,7 @@ int main(int argc, char *argv[])
|
|||||||
cpuTime time;
|
cpuTime time;
|
||||||
for (label testi = 0; testi < nTests; ++ testi)
|
for (label testi = 0; testi < nTests; ++ testi)
|
||||||
{
|
{
|
||||||
Random rndGen(seed + testi);
|
randomGenerator rndGen(seed + testi);
|
||||||
|
|
||||||
// Get random points
|
// Get random points
|
||||||
ps.resize(nPs);
|
ps.resize(nPs);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2023-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -60,7 +60,7 @@ int main(int argc, char *argv[])
|
|||||||
static const label nSamples = 10000000;
|
static const label nSamples = 10000000;
|
||||||
|
|
||||||
// Initialise the random number generator
|
// Initialise the random number generator
|
||||||
Random rndGen(clock::getTime());
|
randomGenerator rndGen(clock::getTime());
|
||||||
|
|
||||||
// Create a zero-size-exponent, zero-sampling-size-exponent distribution
|
// Create a zero-size-exponent, zero-sampling-size-exponent distribution
|
||||||
// from which to get X-coordinates
|
// from which to get X-coordinates
|
||||||
|
|||||||
@ -41,7 +41,7 @@ Description
|
|||||||
#include "polyTopoChange.H"
|
#include "polyTopoChange.H"
|
||||||
#include "fvcDiv.H"
|
#include "fvcDiv.H"
|
||||||
#include "zeroGradientFvPatchFields.H"
|
#include "zeroGradientFvPatchFields.H"
|
||||||
#include "Random.H"
|
#include "randomGenerator.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ int main(int argc, char *argv[])
|
|||||||
timeSelector::select0(runTime, args);
|
timeSelector::select0(runTime, args);
|
||||||
#include "createMesh.H"
|
#include "createMesh.H"
|
||||||
|
|
||||||
Random rndGen(0);
|
randomGenerator rndGen(0);
|
||||||
|
|
||||||
// Test mapping
|
// Test mapping
|
||||||
// ------------
|
// ------------
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
#include "cpuTime.H"
|
#include "cpuTime.H"
|
||||||
#include "Pair.H"
|
#include "Pair.H"
|
||||||
#include "Random.H"
|
#include "randomGenerator.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
@ -17,7 +17,7 @@ static const label E = 4;
|
|||||||
template<class Pow>
|
template<class Pow>
|
||||||
Pair<scalar> run(Pow pow)
|
Pair<scalar> run(Pow pow)
|
||||||
{
|
{
|
||||||
Random rndGen(0);
|
randomGenerator rndGen(0);
|
||||||
|
|
||||||
cpuTime time;
|
cpuTime time;
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2012-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -37,7 +37,7 @@ Description
|
|||||||
#include "OPstream.H"
|
#include "OPstream.H"
|
||||||
#include "vector.H"
|
#include "vector.H"
|
||||||
#include "IOstreams.H"
|
#include "IOstreams.H"
|
||||||
#include "Random.H"
|
#include "randomGenerator.H"
|
||||||
#include "Tuple2.H"
|
#include "Tuple2.H"
|
||||||
#include "PstreamBuffers.H"
|
#include "PstreamBuffers.H"
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -37,7 +37,7 @@ Description
|
|||||||
#include "OPstream.H"
|
#include "OPstream.H"
|
||||||
#include "vector.H"
|
#include "vector.H"
|
||||||
#include "IOstreams.H"
|
#include "IOstreams.H"
|
||||||
#include "Random.H"
|
#include "randomGenerator.H"
|
||||||
#include "Tuple2.H"
|
#include "Tuple2.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
@ -56,7 +56,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (true)
|
if (true)
|
||||||
{
|
{
|
||||||
Random rndGen(43544*Pstream::myProcNo());
|
randomGenerator rndGen(43544*Pstream::myProcNo());
|
||||||
|
|
||||||
// Generate random data.
|
// Generate random data.
|
||||||
List<Tuple2<label, List<scalar>>> complexData(100);
|
List<Tuple2<label, List<scalar>>> complexData(100);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2021-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2021-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -76,7 +76,7 @@ int main(int argc, char *argv[])
|
|||||||
Info<< "Seeding random number generator with value " << seed
|
Info<< "Seeding random number generator with value " << seed
|
||||||
<< nl << endl;
|
<< nl << endl;
|
||||||
}
|
}
|
||||||
Random rndGen(seed);
|
randomGenerator rndGen(seed);
|
||||||
|
|
||||||
// Get controls
|
// Get controls
|
||||||
const bool simple = args.optionFound("simple");
|
const bool simple = args.optionFound("simple");
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#include "primitiveFields.H"
|
#include "primitiveFields.H"
|
||||||
#include "Random.H"
|
#include "randomGenerator.H"
|
||||||
#include "cpuTime.H"
|
#include "cpuTime.H"
|
||||||
#include "IOstreams.H"
|
#include "IOstreams.H"
|
||||||
#include "OFstream.H"
|
#include "OFstream.H"
|
||||||
@ -15,7 +15,7 @@ int main()
|
|||||||
const label rndAddrSkip = 40;
|
const label rndAddrSkip = 40;
|
||||||
const label redFac = 6;
|
const label redFac = 6;
|
||||||
const label redSize = size/redFac;
|
const label redSize = size/redFac;
|
||||||
Random genAddr(100);
|
randomGenerator rndGen(100);
|
||||||
|
|
||||||
double* f1 = new double[size];
|
double* f1 = new double[size];
|
||||||
double* f2 = new double[size];
|
double* f2 = new double[size];
|
||||||
@ -38,7 +38,7 @@ int main()
|
|||||||
|
|
||||||
for (label i=0; i<size; i+=rndAddrSkip)
|
for (label i=0; i<size; i+=rndAddrSkip)
|
||||||
{
|
{
|
||||||
addr[i] = genAddr.sampleAB<label>(0, size);
|
addr[i] = rndGen.sampleAB<label>(0, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (label i=0; i<redSize; i++)
|
for (label i=0; i<redSize; i++)
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -33,14 +33,14 @@ Description
|
|||||||
#include "argList.H"
|
#include "argList.H"
|
||||||
#include "polyMesh.H"
|
#include "polyMesh.H"
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
#include "Random.H"
|
#include "randomGenerator.H"
|
||||||
#include "PackedList.H"
|
#include "PackedList.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void testPackedList(const polyMesh& mesh, Random& rndGen)
|
void testPackedList(const polyMesh& mesh, randomGenerator& rndGen)
|
||||||
{
|
{
|
||||||
Info<< nl << "Testing PackedList synchronisation." << endl;
|
Info<< nl << "Testing PackedList synchronisation." << endl;
|
||||||
|
|
||||||
@ -182,7 +182,7 @@ void testPackedList(const polyMesh& mesh, Random& rndGen)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void testSparseData(const polyMesh& mesh, Random& rndGen)
|
void testSparseData(const polyMesh& mesh, randomGenerator& rndGen)
|
||||||
{
|
{
|
||||||
Info<< nl << "Testing Map synchronisation." << endl;
|
Info<< nl << "Testing Map synchronisation." << endl;
|
||||||
|
|
||||||
@ -372,7 +372,7 @@ void testSparseData(const polyMesh& mesh, Random& rndGen)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void testPointSync(const polyMesh& mesh, Random& rndGen)
|
void testPointSync(const polyMesh& mesh, randomGenerator& rndGen)
|
||||||
{
|
{
|
||||||
Info<< nl << "Testing point-wise data synchronisation." << endl;
|
Info<< nl << "Testing point-wise data synchronisation." << endl;
|
||||||
|
|
||||||
@ -440,7 +440,7 @@ void testPointSync(const polyMesh& mesh, Random& rndGen)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void testEdgeSync(const polyMesh& mesh, Random& rndGen)
|
void testEdgeSync(const polyMesh& mesh, randomGenerator& rndGen)
|
||||||
{
|
{
|
||||||
Info<< nl << "Testing edge-wise data synchronisation." << endl;
|
Info<< nl << "Testing edge-wise data synchronisation." << endl;
|
||||||
|
|
||||||
@ -517,7 +517,7 @@ void testEdgeSync(const polyMesh& mesh, Random& rndGen)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void testFaceSync(const polyMesh& mesh, Random& rndGen)
|
void testFaceSync(const polyMesh& mesh, randomGenerator& rndGen)
|
||||||
{
|
{
|
||||||
Info<< nl << "Testing face-wise data synchronisation." << endl;
|
Info<< nl << "Testing face-wise data synchronisation." << endl;
|
||||||
|
|
||||||
@ -593,7 +593,7 @@ int main(int argc, char *argv[])
|
|||||||
#include "createPolyMesh.H"
|
#include "createPolyMesh.H"
|
||||||
|
|
||||||
|
|
||||||
Random rndGen(5341*(Pstream::myProcNo()+1));
|
randomGenerator rndGen(5341*(Pstream::myProcNo()+1));
|
||||||
|
|
||||||
|
|
||||||
// Face sync
|
// Face sync
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
mkDir(pdfPath);
|
mkDir(pdfPath);
|
||||||
|
|
||||||
Random rndGen(label(0));
|
randomGenerator rndGen(label(0));
|
||||||
|
|
||||||
autoPtr<distribution> p
|
autoPtr<distribution> p
|
||||||
(
|
(
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
Random rndGen(653213);
|
randomGenerator rndGen(653213);
|
||||||
|
|
||||||
// Determine mesh bounding boxes:
|
// Determine mesh bounding boxes:
|
||||||
List<treeBoundBox> meshBb
|
List<treeBoundBox> meshBb
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2014-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2014-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -168,7 +168,7 @@ void createBoundaryEdgeTrees
|
|||||||
+ surf.nInternalEdges()
|
+ surf.nInternalEdges()
|
||||||
);
|
);
|
||||||
|
|
||||||
Random rndGen(17301893);
|
randomGenerator rndGen(17301893);
|
||||||
|
|
||||||
// Slightly extended bb. Slightly off-centred just so on symmetric
|
// Slightly extended bb. Slightly off-centred just so on symmetric
|
||||||
// geometry there are less face/edge aligned items.
|
// geometry there are less face/edge aligned items.
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -36,7 +36,7 @@ Description
|
|||||||
#include "triSurface.H"
|
#include "triSurface.H"
|
||||||
#include "OFstream.H"
|
#include "OFstream.H"
|
||||||
#include "meshTools.H"
|
#include "meshTools.H"
|
||||||
#include "Random.H"
|
#include "randomGenerator.H"
|
||||||
#include "transform.H"
|
#include "transform.H"
|
||||||
#include "IOmanip.H"
|
#include "IOmanip.H"
|
||||||
#include "Pair.H"
|
#include "Pair.H"
|
||||||
@ -114,7 +114,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
label pertI = 0;
|
label pertI = 0;
|
||||||
|
|
||||||
Random rand(57373);
|
randomGenerator rndGen(57373);
|
||||||
|
|
||||||
while ((magSqr(eVal) < vSmall) && pertI < 10)
|
while ((magSqr(eVal) < vSmall) && pertI < 10)
|
||||||
{
|
{
|
||||||
@ -122,9 +122,9 @@ int main(int argc, char *argv[])
|
|||||||
<< "No eigenValues found, shape may have symmetry, "
|
<< "No eigenValues found, shape may have symmetry, "
|
||||||
<< "perturbing inertia tensor diagonal" << endl;
|
<< "perturbing inertia tensor diagonal" << endl;
|
||||||
|
|
||||||
J.xx() *= 1.0 + small*rand.scalar01();
|
J.xx() *= 1.0 + small*rndGen.scalar01();
|
||||||
J.yy() *= 1.0 + small*rand.scalar01();
|
J.yy() *= 1.0 + small*rndGen.scalar01();
|
||||||
J.zz() *= 1.0 + small*rand.scalar01();
|
J.zz() *= 1.0 + small*rndGen.scalar01();
|
||||||
|
|
||||||
eVal = eigenValues(J);
|
eVal = eigenValues(J);
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -40,7 +40,7 @@ Description
|
|||||||
#include "boundBox.H"
|
#include "boundBox.H"
|
||||||
#include "indexedOctree.H"
|
#include "indexedOctree.H"
|
||||||
#include "treeDataTriSurface.H"
|
#include "treeDataTriSurface.H"
|
||||||
#include "Random.H"
|
#include "randomGenerator.H"
|
||||||
#include "volumeType.H"
|
#include "volumeType.H"
|
||||||
#include "plane.H"
|
#include "plane.H"
|
||||||
|
|
||||||
|
|||||||
@ -136,7 +136,7 @@ sha1 = primitives/hashes/SHA1
|
|||||||
$(sha1)/SHA1.C
|
$(sha1)/SHA1.C
|
||||||
$(sha1)/SHA1Digest.C
|
$(sha1)/SHA1Digest.C
|
||||||
|
|
||||||
primitives/Random/Random.C
|
primitives/randomGenerator/randomGenerator.C
|
||||||
|
|
||||||
ranges = primitives/ranges
|
ranges = primitives/ranges
|
||||||
$(ranges)/labelRange/labelRange.C
|
$(ranges)/labelRange/labelRange.C
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2022-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -34,7 +34,7 @@ SourceFiles
|
|||||||
#define boundSphere_H
|
#define boundSphere_H
|
||||||
|
|
||||||
#include "point.H"
|
#include "point.H"
|
||||||
#include "Random.H"
|
#include "randomGenerator.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -78,7 +78,11 @@ Tuple2<point, scalar> weizlBoundSphere
|
|||||||
//- Compute a bounding sphere for an arbitrary number of points, and given an
|
//- Compute a bounding sphere for an arbitrary number of points, and given an
|
||||||
// engine with which to randomise Weizl's algorithm
|
// engine with which to randomise Weizl's algorithm
|
||||||
template<class PointField>
|
template<class PointField>
|
||||||
Tuple2<point, scalar> boundSphere(const PointField& ps, Random& rndGen);
|
Tuple2<point, scalar> boundSphere
|
||||||
|
(
|
||||||
|
const PointField& ps,
|
||||||
|
randomGenerator& rndGen
|
||||||
|
);
|
||||||
|
|
||||||
//- Compute a bounding sphere for an arbitrary number of points
|
//- Compute a bounding sphere for an arbitrary number of points
|
||||||
template<class PointField>
|
template<class PointField>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2022-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2022-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -254,7 +254,7 @@ Foam::Tuple2<Foam::point, Foam::scalar> Foam::weizlBoundSphere
|
|||||||
|
|
||||||
template<class PointField>
|
template<class PointField>
|
||||||
Foam::Tuple2<Foam::point, Foam::scalar>
|
Foam::Tuple2<Foam::point, Foam::scalar>
|
||||||
Foam::boundSphere(const PointField& ps, Random& rndGen)
|
Foam::boundSphere(const PointField& ps, randomGenerator& rndGen)
|
||||||
{
|
{
|
||||||
if (ps.size() <= 4)
|
if (ps.size() <= 4)
|
||||||
{
|
{
|
||||||
@ -283,7 +283,7 @@ Foam::boundSphere(const PointField& ps)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
labelList pis(identityMap(ps.size()));
|
labelList pis(identityMap(ps.size()));
|
||||||
Random(0).permute(pis);
|
randomGenerator(0).permute(pis);
|
||||||
FixedList<label, 4> boundaryPis({-1, -1, -1, -1});
|
FixedList<label, 4> boundaryPis({-1, -1, -1, -1});
|
||||||
return weizlBoundSphere(ps, pis, ps.size(), boundaryPis, 0);
|
return weizlBoundSphere(ps, pis, ps.size(), boundaryPis, 0);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2021-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2021-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -186,7 +186,7 @@ bool Foam::polygonTriangulate::ear
|
|||||||
|
|
||||||
Foam::List<Foam::point> Foam::polygonTriangulate::randomPolygon
|
Foam::List<Foam::point> Foam::polygonTriangulate::randomPolygon
|
||||||
(
|
(
|
||||||
Random& rndGen,
|
randomGenerator& rndGen,
|
||||||
const label n,
|
const label n,
|
||||||
const scalar error
|
const scalar error
|
||||||
)
|
)
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2021 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2021-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -237,7 +237,7 @@ public:
|
|||||||
//- Generate a random polygon for testing purposes
|
//- Generate a random polygon for testing purposes
|
||||||
static List<point> randomPolygon
|
static List<point> randomPolygon
|
||||||
(
|
(
|
||||||
Random& rndGen,
|
randomGenerator& rndGen,
|
||||||
const label n,
|
const label n,
|
||||||
const scalar error
|
const scalar error
|
||||||
);
|
);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -74,7 +74,7 @@ Foam::tmp<Foam::scalarField> Foam::distributions::RosinRammler::Phi
|
|||||||
Foam::distributions::RosinRammler::RosinRammler
|
Foam::distributions::RosinRammler::RosinRammler
|
||||||
(
|
(
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
Random& rndGen,
|
randomGenerator& rndGen,
|
||||||
const label sampleQ
|
const label sampleQ
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -125,7 +125,7 @@ public:
|
|||||||
RosinRammler
|
RosinRammler
|
||||||
(
|
(
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
Random& rndGen,
|
randomGenerator& rndGen,
|
||||||
const label sampleQ
|
const label sampleQ
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -77,7 +77,7 @@ Foam::distribution::distribution
|
|||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
Random& rndGen,
|
randomGenerator& rndGen,
|
||||||
const label sampleQ
|
const label sampleQ
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
@ -103,7 +103,7 @@ Foam::distribution::distribution
|
|||||||
|
|
||||||
Foam::distribution::distribution
|
Foam::distribution::distribution
|
||||||
(
|
(
|
||||||
Random& rndGen,
|
randomGenerator& rndGen,
|
||||||
const label Q,
|
const label Q,
|
||||||
const label sampleQ
|
const label sampleQ
|
||||||
)
|
)
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -60,7 +60,7 @@ SourceFiles
|
|||||||
#define distribution_H
|
#define distribution_H
|
||||||
|
|
||||||
#include "dictionary.H"
|
#include "dictionary.H"
|
||||||
#include "Random.H"
|
#include "randomGenerator.H"
|
||||||
#include "scalarField.H"
|
#include "scalarField.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -79,7 +79,7 @@ protected:
|
|||||||
// Protected data
|
// Protected data
|
||||||
|
|
||||||
//- Reference to a random number generator
|
//- Reference to a random number generator
|
||||||
Random& rndGen_;
|
randomGenerator& rndGen_;
|
||||||
|
|
||||||
//- Distribution size exponent
|
//- Distribution size exponent
|
||||||
const label Q_;
|
const label Q_;
|
||||||
@ -124,7 +124,7 @@ public:
|
|||||||
dictionary,
|
dictionary,
|
||||||
(
|
(
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
Random& rndGen,
|
randomGenerator& rndGen,
|
||||||
const label sampleQ
|
const label sampleQ
|
||||||
),
|
),
|
||||||
(dict, rndGen, sampleQ)
|
(dict, rndGen, sampleQ)
|
||||||
@ -138,12 +138,17 @@ public:
|
|||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
Random& rndGen,
|
randomGenerator& rndGen,
|
||||||
const label sampleQ
|
const label sampleQ
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
distribution(Random& rndGen, const label Q, const label sampleQ);
|
distribution
|
||||||
|
(
|
||||||
|
randomGenerator& rndGen,
|
||||||
|
const label Q,
|
||||||
|
const label sampleQ
|
||||||
|
);
|
||||||
|
|
||||||
//- Construct copy
|
//- Construct copy
|
||||||
distribution(const distribution& d, const label sampleQ);
|
distribution(const distribution& d, const label sampleQ);
|
||||||
@ -162,7 +167,7 @@ public:
|
|||||||
static autoPtr<distribution> New
|
static autoPtr<distribution> New
|
||||||
(
|
(
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
Random& rndGen,
|
randomGenerator& rndGen,
|
||||||
const label sampleQ
|
const label sampleQ
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -30,7 +30,7 @@ License
|
|||||||
Foam::autoPtr<Foam::distribution> Foam::distribution::New
|
Foam::autoPtr<Foam::distribution> Foam::distribution::New
|
||||||
(
|
(
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
Random& rndGen,
|
randomGenerator& rndGen,
|
||||||
const label sampleQ
|
const label sampleQ
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -72,7 +72,7 @@ Foam::tmp<Foam::scalarField> Foam::distributions::exponential::Phi
|
|||||||
Foam::distributions::exponential::exponential
|
Foam::distributions::exponential::exponential
|
||||||
(
|
(
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
Random& rndGen,
|
randomGenerator& rndGen,
|
||||||
const label sampleQ
|
const label sampleQ
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -115,7 +115,7 @@ public:
|
|||||||
exponential
|
exponential
|
||||||
(
|
(
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
Random& rndGen,
|
randomGenerator& rndGen,
|
||||||
const label sampleQ
|
const label sampleQ
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -43,7 +43,7 @@ namespace distributions
|
|||||||
Foam::distributions::fixedValue::fixedValue
|
Foam::distributions::fixedValue::fixedValue
|
||||||
(
|
(
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
Random& rndGen,
|
randomGenerator& rndGen,
|
||||||
const label
|
const label
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -82,7 +82,7 @@ public:
|
|||||||
fixedValue
|
fixedValue
|
||||||
(
|
(
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
Random& rndGen,
|
randomGenerator& rndGen,
|
||||||
const label sampleQ
|
const label sampleQ
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -113,7 +113,7 @@ Foam::tmp<Foam::scalarField> Foam::distributions::multiNormal::Phi
|
|||||||
Foam::distributions::multiNormal::multiNormal
|
Foam::distributions::multiNormal::multiNormal
|
||||||
(
|
(
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
Random& rndGen,
|
randomGenerator& rndGen,
|
||||||
const label sampleQ
|
const label sampleQ
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -119,7 +119,7 @@ public:
|
|||||||
multiNormal
|
multiNormal
|
||||||
(
|
(
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
Random& rndGen,
|
randomGenerator& rndGen,
|
||||||
const label sampleQ
|
const label sampleQ
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -108,7 +108,7 @@ Foam::scalar Foam::distributions::normal::sampleForZeroQ(const scalar s) const
|
|||||||
Foam::distributions::normal::normal
|
Foam::distributions::normal::normal
|
||||||
(
|
(
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
Random& rndGen,
|
randomGenerator& rndGen,
|
||||||
const label sampleQ
|
const label sampleQ
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
@ -133,7 +133,7 @@ Foam::distributions::normal::normal
|
|||||||
|
|
||||||
Foam::distributions::normal::normal
|
Foam::distributions::normal::normal
|
||||||
(
|
(
|
||||||
Random& rndGen,
|
randomGenerator& rndGen,
|
||||||
const label Q,
|
const label Q,
|
||||||
const label sampleQ,
|
const label sampleQ,
|
||||||
const label n,
|
const label n,
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -136,14 +136,14 @@ public:
|
|||||||
normal
|
normal
|
||||||
(
|
(
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
Random& rndGen,
|
randomGenerator& rndGen,
|
||||||
const label sampleQ
|
const label sampleQ
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
normal
|
normal
|
||||||
(
|
(
|
||||||
Random& rndGen,
|
randomGenerator& rndGen,
|
||||||
const label Q,
|
const label Q,
|
||||||
const label sampleQ,
|
const label sampleQ,
|
||||||
const label n,
|
const label n,
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -45,7 +45,7 @@ namespace distributions
|
|||||||
Foam::distributions::tabulatedCumulative::tabulatedCumulative
|
Foam::distributions::tabulatedCumulative::tabulatedCumulative
|
||||||
(
|
(
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
Random& rndGen,
|
randomGenerator& rndGen,
|
||||||
const label sampleQ
|
const label sampleQ
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -103,7 +103,7 @@ public:
|
|||||||
tabulatedCumulative
|
tabulatedCumulative
|
||||||
(
|
(
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
Random& rndGen,
|
randomGenerator& rndGen,
|
||||||
const label sampleQ
|
const label sampleQ
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -45,7 +45,7 @@ namespace distributions
|
|||||||
Foam::distributions::tabulatedDensity::tabulatedDensity
|
Foam::distributions::tabulatedDensity::tabulatedDensity
|
||||||
(
|
(
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
Random& rndGen,
|
randomGenerator& rndGen,
|
||||||
const label sampleQ
|
const label sampleQ
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -104,7 +104,7 @@ public:
|
|||||||
tabulatedDensity
|
tabulatedDensity
|
||||||
(
|
(
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
Random& rndGen,
|
randomGenerator& rndGen,
|
||||||
const label sampleQ
|
const label sampleQ
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -58,7 +58,7 @@ Foam::scalar Foam::distributions::uniform::Phi(const scalar x) const
|
|||||||
Foam::distributions::uniform::uniform
|
Foam::distributions::uniform::uniform
|
||||||
(
|
(
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
Random& rndGen,
|
randomGenerator& rndGen,
|
||||||
const label sampleQ
|
const label sampleQ
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -97,7 +97,12 @@ public:
|
|||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from a dictionary
|
//- Construct from a dictionary
|
||||||
uniform(const dictionary& dict, Random& rndGen, const label sampleQ);
|
uniform
|
||||||
|
(
|
||||||
|
const dictionary& dict,
|
||||||
|
randomGenerator& rndGen,
|
||||||
|
const label sampleQ
|
||||||
|
);
|
||||||
|
|
||||||
//- Construct copy
|
//- Construct copy
|
||||||
uniform(const uniform& d, const label sampleQ);
|
uniform(const uniform& d, const label sampleQ);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2023-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -306,7 +306,7 @@ Foam::distributions::unintegrable::unintegrable
|
|||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
Random& rndGen,
|
randomGenerator& rndGen,
|
||||||
const label sampleQ
|
const label sampleQ
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
@ -317,7 +317,7 @@ Foam::distributions::unintegrable::unintegrable
|
|||||||
|
|
||||||
Foam::distributions::unintegrable::unintegrable
|
Foam::distributions::unintegrable::unintegrable
|
||||||
(
|
(
|
||||||
Random& rndGen,
|
randomGenerator& rndGen,
|
||||||
const label Q,
|
const label Q,
|
||||||
const label sampleQ,
|
const label sampleQ,
|
||||||
const label n
|
const label n
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2023-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -188,14 +188,14 @@ public:
|
|||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
Random& rndGen,
|
randomGenerator& rndGen,
|
||||||
const label sampleQ
|
const label sampleQ
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct from components
|
//- Construct from components
|
||||||
unintegrable
|
unintegrable
|
||||||
(
|
(
|
||||||
Random& rndGen,
|
randomGenerator& rndGen,
|
||||||
const label Q,
|
const label Q,
|
||||||
const label sampleQ,
|
const label sampleQ,
|
||||||
const label n
|
const label n
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2013-2019 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -26,7 +26,7 @@ License
|
|||||||
#include "procFacesGAMGProcAgglomeration.H"
|
#include "procFacesGAMGProcAgglomeration.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "GAMGAgglomeration.H"
|
#include "GAMGAgglomeration.H"
|
||||||
#include "Random.H"
|
#include "randomGenerator.H"
|
||||||
#include "lduMesh.H"
|
#include "lduMesh.H"
|
||||||
#include "processorLduInterface.H"
|
#include "processorLduInterface.H"
|
||||||
#include "processorGAMGInterface.H"
|
#include "processorGAMGInterface.H"
|
||||||
@ -253,7 +253,7 @@ bool Foam::procFacesGAMGProcAgglomeration::agglomerate()
|
|||||||
|
|
||||||
if (agglom_.size() >= 1)
|
if (agglom_.size() >= 1)
|
||||||
{
|
{
|
||||||
Random rndGen(0);
|
randomGenerator rndGen(0);
|
||||||
|
|
||||||
for
|
for
|
||||||
(
|
(
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -41,7 +41,7 @@ SourceFiles
|
|||||||
#include "point.H"
|
#include "point.H"
|
||||||
#include "primitiveFieldsFwd.H"
|
#include "primitiveFieldsFwd.H"
|
||||||
#include "pointHit.H"
|
#include "pointHit.H"
|
||||||
#include "Random.H"
|
#include "randomGenerator.H"
|
||||||
#include "FixedList.H"
|
#include "FixedList.H"
|
||||||
#include "UList.H"
|
#include "UList.H"
|
||||||
#include "triPointRef.H"
|
#include "triPointRef.H"
|
||||||
@ -162,7 +162,7 @@ public:
|
|||||||
|
|
||||||
//- Return a random point in the tetrahedron from a
|
//- Return a random point in the tetrahedron from a
|
||||||
// uniform distribution
|
// uniform distribution
|
||||||
inline Point randomPoint(Random& rndGen) const;
|
inline Point randomPoint(randomGenerator& rndGen) const;
|
||||||
|
|
||||||
//- Calculate the point from the given barycentric coordinates.
|
//- Calculate the point from the given barycentric coordinates.
|
||||||
inline Point barycentricToPoint(const barycentric& bary) const;
|
inline Point barycentricToPoint(const barycentric& bary) const;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -216,7 +216,7 @@ inline Foam::scalar Foam::tetrahedron<Point, PointRef>::quality() const
|
|||||||
template<class Point, class PointRef>
|
template<class Point, class PointRef>
|
||||||
inline Point Foam::tetrahedron<Point, PointRef>::randomPoint
|
inline Point Foam::tetrahedron<Point, PointRef>::randomPoint
|
||||||
(
|
(
|
||||||
Random& rndGen
|
randomGenerator& rndGen
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return barycentricToPoint(barycentric01(rndGen));
|
return barycentricToPoint(barycentric01(rndGen));
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -39,7 +39,7 @@ SourceFiles
|
|||||||
#include "vector.H"
|
#include "vector.H"
|
||||||
#include "tensor.H"
|
#include "tensor.H"
|
||||||
#include "pointHit.H"
|
#include "pointHit.H"
|
||||||
#include "Random.H"
|
#include "randomGenerator.H"
|
||||||
#include "FixedList.H"
|
#include "FixedList.H"
|
||||||
#include "UList.H"
|
#include "UList.H"
|
||||||
#include "linePointRef.H"
|
#include "linePointRef.H"
|
||||||
@ -161,7 +161,7 @@ public:
|
|||||||
|
|
||||||
//- Return a random point on the triangle from a uniform
|
//- Return a random point on the triangle from a uniform
|
||||||
// distribution
|
// distribution
|
||||||
inline Point randomPoint(Random& rndGen) const;
|
inline Point randomPoint(randomGenerator& rndGen) const;
|
||||||
|
|
||||||
//- Calculate the point from the given barycentric coordinates.
|
//- Calculate the point from the given barycentric coordinates.
|
||||||
inline Point barycentricToPoint(const barycentric2D& bary) const;
|
inline Point barycentricToPoint(const barycentric2D& bary) const;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -213,7 +213,10 @@ inline Foam::tensor Foam::triangle<Point, PointRef>::inertia
|
|||||||
|
|
||||||
|
|
||||||
template<class Point, class PointRef>
|
template<class Point, class PointRef>
|
||||||
inline Point Foam::triangle<Point, PointRef>::randomPoint(Random& rndGen) const
|
inline Point Foam::triangle<Point, PointRef>::randomPoint
|
||||||
|
(
|
||||||
|
randomGenerator& rndGen
|
||||||
|
) const
|
||||||
{
|
{
|
||||||
return barycentricToPoint(barycentric2D01(rndGen));
|
return barycentricToPoint(barycentric2D01(rndGen));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -67,7 +67,7 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
class Random;
|
class randomGenerator;
|
||||||
|
|
||||||
|
|
||||||
// Forward declaration of friend functions and operators
|
// Forward declaration of friend functions and operators
|
||||||
|
|||||||
@ -24,7 +24,7 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "treeBoundBox.H"
|
#include "treeBoundBox.H"
|
||||||
#include "Random.H"
|
#include "randomGenerator.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2017-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,11 +24,11 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "barycentric.H"
|
#include "barycentric.H"
|
||||||
#include "Random.H"
|
#include "randomGenerator.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::barycentric Foam::barycentric01(Random& rndGen)
|
Foam::barycentric Foam::barycentric01(randomGenerator& rndGen)
|
||||||
{
|
{
|
||||||
scalar s = rndGen.scalar01();
|
scalar s = rndGen.scalar01();
|
||||||
scalar t = rndGen.scalar01();
|
scalar t = rndGen.scalar01();
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2016-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -42,7 +42,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
// Forward declaration of classes
|
// Forward declaration of classes
|
||||||
class Random;
|
class randomGenerator;
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -51,7 +51,7 @@ typedef Barycentric<scalar> barycentric;
|
|||||||
|
|
||||||
|
|
||||||
//- Generate a random barycentric coordinate within the unit tetrahedron
|
//- Generate a random barycentric coordinate within the unit tetrahedron
|
||||||
barycentric barycentric01(Random& rndGen);
|
barycentric barycentric01(randomGenerator& rndGen);
|
||||||
|
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2017-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,11 +24,11 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "barycentric2D.H"
|
#include "barycentric2D.H"
|
||||||
#include "Random.H"
|
#include "randomGenerator.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::barycentric2D Foam::barycentric2D01(Random& rndGen)
|
Foam::barycentric2D Foam::barycentric2D01(randomGenerator& rndGen)
|
||||||
{
|
{
|
||||||
scalar s = rndGen.scalar01();
|
scalar s = rndGen.scalar01();
|
||||||
scalar t = rndGen.scalar01();
|
scalar t = rndGen.scalar01();
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2017-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -42,7 +42,7 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
// Forward declaration of classes
|
// Forward declaration of classes
|
||||||
class Random;
|
class randomGenerator;
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -51,7 +51,7 @@ typedef Barycentric2D<scalar> barycentric2D;
|
|||||||
|
|
||||||
|
|
||||||
//- Generate a random barycentric coordinate within the unit triangle
|
//- Generate a random barycentric coordinate within the unit triangle
|
||||||
barycentric2D barycentric2D01(Random& rndGen);
|
barycentric2D barycentric2D01(randomGenerator& rndGen);
|
||||||
|
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2018-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -23,12 +23,12 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "Random.H"
|
#include "randomGenerator.H"
|
||||||
#include "PstreamReduceOps.H"
|
#include "PstreamReduceOps.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::scalar Foam::Random::scalarNormal()
|
Foam::scalar Foam::randomGenerator::scalarNormal()
|
||||||
{
|
{
|
||||||
// Proper inversion of the distribution. Slow. Exactly maintains
|
// Proper inversion of the distribution. Slow. Exactly maintains
|
||||||
// the random behaviour of the generator.
|
// the random behaviour of the generator.
|
||||||
@ -91,7 +91,7 @@ Foam::scalar Foam::Random::scalarNormal()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::scalar Foam::Random::globalScalar01()
|
Foam::scalar Foam::randomGenerator::globalScalar01()
|
||||||
{
|
{
|
||||||
scalar value = - vGreat;
|
scalar value = - vGreat;
|
||||||
|
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2018-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2018-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -22,7 +22,7 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::Random
|
Foam::randomGenerator
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Random number generator
|
Random number generator
|
||||||
@ -37,12 +37,13 @@ Description
|
|||||||
details of the seeding and iteration sequence.
|
details of the seeding and iteration sequence.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
RandomI.H
|
randomGenerator.C
|
||||||
|
randomGeneratorI.H
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef Random_H
|
#ifndef randomGenerator_H
|
||||||
#define Random_H
|
#define randomGenerator_H
|
||||||
|
|
||||||
#include "scalar.H"
|
#include "scalar.H"
|
||||||
|
|
||||||
@ -52,10 +53,10 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class Random Declaration
|
Class randomGenerator Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class Random
|
class randomGenerator
|
||||||
{
|
{
|
||||||
// Private Typedefs
|
// Private Typedefs
|
||||||
|
|
||||||
@ -92,11 +93,11 @@ public:
|
|||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from a seed
|
//- Construct from a seed
|
||||||
inline Random(const label s);
|
inline randomGenerator(const label s);
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
inline ~Random();
|
inline ~randomGenerator();
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
@ -150,19 +151,19 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
inline scalar Random::sample01();
|
inline scalar randomGenerator::sample01();
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
inline label Random::sample01();
|
inline label randomGenerator::sample01();
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
inline scalar Random::sampleAB(const scalar& a, const scalar& b);
|
inline scalar randomGenerator::sampleAB(const scalar& a, const scalar& b);
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
inline label Random::sampleAB(const label& a, const label& b);
|
inline label randomGenerator::sampleAB(const label& a, const label& b);
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
inline scalar Random::sampleNormal();
|
inline scalar randomGenerator::sampleNormal();
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -171,7 +172,7 @@ inline scalar Random::sampleNormal();
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#include "RandomI.H"
|
#include "randomGeneratorI.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2018-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2018-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -23,11 +23,11 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "Random.H"
|
#include "randomGenerator.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
inline Foam::Random::type Foam::Random::sample()
|
inline Foam::randomGenerator::type Foam::randomGenerator::sample()
|
||||||
{
|
{
|
||||||
x_ = (A*x_ + C) % M;
|
x_ = (A*x_ + C) % M;
|
||||||
|
|
||||||
@ -37,7 +37,7 @@ inline Foam::Random::type Foam::Random::sample()
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
inline Foam::Random::Random(const label s)
|
inline Foam::randomGenerator::randomGenerator(const label s)
|
||||||
:
|
:
|
||||||
x_((type(s) << 16) + 0x330E),
|
x_((type(s) << 16) + 0x330E),
|
||||||
scalarNormalStored_(false),
|
scalarNormalStored_(false),
|
||||||
@ -47,26 +47,30 @@ inline Foam::Random::Random(const label s)
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
inline Foam::Random::~Random()
|
inline Foam::randomGenerator::~randomGenerator()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
inline Foam::scalar Foam::Random::scalar01()
|
inline Foam::scalar Foam::randomGenerator::scalar01()
|
||||||
{
|
{
|
||||||
return scalar(sample())/(M >> 17);
|
return scalar(sample())/(M >> 17);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Foam::scalar Foam::Random::scalarAB(const scalar a, const scalar b)
|
inline Foam::scalar Foam::randomGenerator::scalarAB
|
||||||
|
(
|
||||||
|
const scalar a,
|
||||||
|
const scalar b
|
||||||
|
)
|
||||||
{
|
{
|
||||||
return a + scalar01()*(b - a);
|
return a + scalar01()*(b - a);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
inline Type Foam::Random::sample01()
|
inline Type Foam::randomGenerator::sample01()
|
||||||
{
|
{
|
||||||
Type value;
|
Type value;
|
||||||
|
|
||||||
@ -80,42 +84,50 @@ inline Type Foam::Random::sample01()
|
|||||||
|
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
inline Foam::scalar Foam::Random::sample01()
|
inline Foam::scalar Foam::randomGenerator::sample01()
|
||||||
{
|
{
|
||||||
return scalar01();
|
return scalar01();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
inline Foam::label Foam::Random::sample01()
|
inline Foam::label Foam::randomGenerator::sample01()
|
||||||
{
|
{
|
||||||
return sample() % 2;
|
return sample() % 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
inline Type Foam::Random::sampleAB(const Type& a, const Type& b)
|
inline Type Foam::randomGenerator::sampleAB(const Type& a, const Type& b)
|
||||||
{
|
{
|
||||||
return a + cmptMultiply(sample01<Type>(), b - a);
|
return a + cmptMultiply(sample01<Type>(), b - a);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
inline Foam::scalar Foam::Random::sampleAB(const scalar& a, const scalar& b)
|
inline Foam::scalar Foam::randomGenerator::sampleAB
|
||||||
|
(
|
||||||
|
const scalar& a,
|
||||||
|
const scalar& b
|
||||||
|
)
|
||||||
{
|
{
|
||||||
return scalarAB(a, b);
|
return scalarAB(a, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
inline Foam::label Foam::Random::sampleAB(const label& a, const label& b)
|
inline Foam::label Foam::randomGenerator::sampleAB
|
||||||
|
(
|
||||||
|
const label& a,
|
||||||
|
const label& b
|
||||||
|
)
|
||||||
{
|
{
|
||||||
return a + sample() % (b - a);
|
return a + sample() % (b - a);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
inline Type Foam::Random::sampleNormal()
|
inline Type Foam::randomGenerator::sampleNormal()
|
||||||
{
|
{
|
||||||
Type value;
|
Type value;
|
||||||
|
|
||||||
@ -129,14 +141,14 @@ inline Type Foam::Random::sampleNormal()
|
|||||||
|
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
inline Foam::scalar Foam::Random::sampleNormal()
|
inline Foam::scalar Foam::randomGenerator::sampleNormal()
|
||||||
{
|
{
|
||||||
return scalarNormal();
|
return scalarNormal();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Container>
|
template<class Container>
|
||||||
inline void Foam::Random::permute(Container& l)
|
inline void Foam::randomGenerator::permute(Container& l)
|
||||||
{
|
{
|
||||||
for (label i = 0; i < l.size(); ++ i)
|
for (label i = 0; i < l.size(); ++ i)
|
||||||
{
|
{
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -73,7 +73,7 @@ SourceFiles
|
|||||||
#ifndef turbulentInletFvPatchField_H
|
#ifndef turbulentInletFvPatchField_H
|
||||||
#define turbulentInletFvPatchField_H
|
#define turbulentInletFvPatchField_H
|
||||||
|
|
||||||
#include "Random.H"
|
#include "randomGenerator.H"
|
||||||
#include "fixedValueFvPatchFields.H"
|
#include "fixedValueFvPatchFields.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -93,7 +93,7 @@ class turbulentInletFvPatchField
|
|||||||
// Private Data
|
// Private Data
|
||||||
|
|
||||||
//- Random number generator
|
//- Random number generator
|
||||||
Random ranGen_;
|
randomGenerator ranGen_;
|
||||||
|
|
||||||
//- Fluctuation scale
|
//- Fluctuation scale
|
||||||
Type fluctuationScale_;
|
Type fluctuationScale_;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2016-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -24,7 +24,7 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
#include "Random.H"
|
#include "randomGenerator.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -38,11 +38,11 @@ bool Foam::functionObjects::randomise::calcRandomised()
|
|||||||
tmp<VolField<Type>> rfieldt(new VolField<Type>(field));
|
tmp<VolField<Type>> rfieldt(new VolField<Type>(field));
|
||||||
VolField<Type>& rfield = rfieldt.ref();
|
VolField<Type>& rfield = rfieldt.ref();
|
||||||
|
|
||||||
Random rand(1234567);
|
randomGenerator rndGen(1234567);
|
||||||
|
|
||||||
forAll(field, celli)
|
forAll(field, celli)
|
||||||
{
|
{
|
||||||
Type rndPert = rand.sample01<Type>();
|
Type rndPert = rndGen.sample01<Type>();
|
||||||
rndPert = 2.0*rndPert - pTraits<Type>::one;
|
rndPert = 2.0*rndPert - pTraits<Type>::one;
|
||||||
rndPert /= mag(rndPert);
|
rndPert /= mag(rndPert);
|
||||||
rfield[celli] += magPerturbation_*rndPert;
|
rfield[celli] += magPerturbation_*rndPert;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -35,7 +35,7 @@ SourceFiles
|
|||||||
#ifndef cellMotionFvPatchField_H
|
#ifndef cellMotionFvPatchField_H
|
||||||
#define cellMotionFvPatchField_H
|
#define cellMotionFvPatchField_H
|
||||||
|
|
||||||
#include "Random.H"
|
#include "randomGenerator.H"
|
||||||
#include "fixedValueFvPatchFields.H"
|
#include "fixedValueFvPatchFields.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -39,7 +39,7 @@ SourceFiles
|
|||||||
#include "Cloud.H"
|
#include "Cloud.H"
|
||||||
#include "IOdictionary.H"
|
#include "IOdictionary.H"
|
||||||
#include "autoPtr.H"
|
#include "autoPtr.H"
|
||||||
#include "Random.H"
|
#include "randomGenerator.H"
|
||||||
#include "fvMesh.H"
|
#include "fvMesh.H"
|
||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
#include "scalarIOField.H"
|
#include "scalarIOField.H"
|
||||||
@ -141,7 +141,7 @@ class DSMCCloud
|
|||||||
List<typename ParcelType::constantProperties> constProps_;
|
List<typename ParcelType::constantProperties> constProps_;
|
||||||
|
|
||||||
//- Random number generator
|
//- Random number generator
|
||||||
Random rndGen_;
|
randomGenerator rndGen_;
|
||||||
|
|
||||||
|
|
||||||
// boundary value fields
|
// boundary value fields
|
||||||
@ -268,7 +268,7 @@ public:
|
|||||||
constProps(label typeId) const;
|
constProps(label typeId) const;
|
||||||
|
|
||||||
//- Return references to the random object
|
//- Return references to the random object
|
||||||
inline Random& rndGen();
|
inline randomGenerator& rndGen();
|
||||||
|
|
||||||
|
|
||||||
// References to the boundary fields for surface data collection
|
// References to the boundary fields for surface data collection
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -118,7 +118,7 @@ Foam::DSMCCloud<ParcelType>::constProps
|
|||||||
|
|
||||||
|
|
||||||
template<class ParcelType>
|
template<class ParcelType>
|
||||||
inline Foam::Random& Foam::DSMCCloud<ParcelType>::rndGen()
|
inline Foam::randomGenerator& Foam::DSMCCloud<ParcelType>::rndGen()
|
||||||
{
|
{
|
||||||
return rndGen_;
|
return rndGen_;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -39,7 +39,7 @@ Foam::scalar Foam::LarsenBorgnakkeVariableHardSphere<CloudType>::energyRatio
|
|||||||
{
|
{
|
||||||
CloudType& cloud(this->owner());
|
CloudType& cloud(this->owner());
|
||||||
|
|
||||||
Random& rndGen(cloud.rndGen());
|
randomGenerator& rndGen(cloud.rndGen());
|
||||||
|
|
||||||
scalar ChiAMinusOne = ChiA - 1;
|
scalar ChiAMinusOne = ChiA - 1;
|
||||||
scalar ChiBMinusOne = ChiB - 1;
|
scalar ChiBMinusOne = ChiB - 1;
|
||||||
@ -179,7 +179,7 @@ void Foam::LarsenBorgnakkeVariableHardSphere<CloudType>::collide
|
|||||||
scalar& EiP = pP.Ei();
|
scalar& EiP = pP.Ei();
|
||||||
scalar& EiQ = pQ.Ei();
|
scalar& EiQ = pQ.Ei();
|
||||||
|
|
||||||
Random& rndGen(cloud.rndGen());
|
randomGenerator& rndGen(cloud.rndGen());
|
||||||
|
|
||||||
scalar inverseCollisionNumber = 1/relaxationCollisionNumber_;
|
scalar inverseCollisionNumber = 1/relaxationCollisionNumber_;
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -114,7 +114,7 @@ void Foam::VariableHardSphere<CloudType>::collide
|
|||||||
vector& UP = pP.U();
|
vector& UP = pP.U();
|
||||||
vector& UQ = pQ.U();
|
vector& UQ = pQ.U();
|
||||||
|
|
||||||
Random& rndGen(cloud.rndGen());
|
randomGenerator& rndGen(cloud.rndGen());
|
||||||
|
|
||||||
scalar mP = cloud.constProps(typeIdP).mass();
|
scalar mP = cloud.constProps(typeIdP).mass();
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -145,7 +145,7 @@ void Foam::FreeStream<CloudType>::inflow()
|
|||||||
|
|
||||||
const scalar deltaT = mesh.time().deltaTValue();
|
const scalar deltaT = mesh.time().deltaTValue();
|
||||||
|
|
||||||
Random& rndGen(cloud.rndGen());
|
randomGenerator& rndGen(cloud.rndGen());
|
||||||
|
|
||||||
scalar sqrtPi = sqrt(pi);
|
scalar sqrtPi = sqrt(pi);
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -80,7 +80,7 @@ void Foam::MaxwellianThermal<CloudType>::correct
|
|||||||
|
|
||||||
CloudType& cloud(this->owner());
|
CloudType& cloud(this->owner());
|
||||||
|
|
||||||
Random& rndGen(cloud.rndGen());
|
randomGenerator& rndGen(cloud.rndGen());
|
||||||
|
|
||||||
while (mag(Ut) < small)
|
while (mag(Ut) < small)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -78,7 +78,7 @@ void Foam::MixedDiffuseSpecular<CloudType>::correct
|
|||||||
|
|
||||||
CloudType& cloud(this->owner());
|
CloudType& cloud(this->owner());
|
||||||
|
|
||||||
Random& rndGen(cloud.rndGen());
|
randomGenerator& rndGen(cloud.rndGen());
|
||||||
|
|
||||||
if (diffuseFraction_ > rndGen.scalar01())
|
if (diffuseFraction_ > rndGen.scalar01())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -25,7 +25,7 @@ License
|
|||||||
|
|
||||||
#include "moleculeCloud.H"
|
#include "moleculeCloud.H"
|
||||||
#include "molecule.H"
|
#include "molecule.H"
|
||||||
#include "Random.H"
|
#include "randomGenerator.H"
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -42,7 +42,7 @@ SourceFiles
|
|||||||
#include "potential.H"
|
#include "potential.H"
|
||||||
#include "InteractionLists.H"
|
#include "InteractionLists.H"
|
||||||
#include "labelVector.H"
|
#include "labelVector.H"
|
||||||
#include "Random.H"
|
#include "randomGenerator.H"
|
||||||
#include "fileName.H"
|
#include "fileName.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -70,7 +70,7 @@ class moleculeCloud
|
|||||||
|
|
||||||
List<molecule::constantProperties> constPropList_;
|
List<molecule::constantProperties> constPropList_;
|
||||||
|
|
||||||
Random rndGen_;
|
randomGenerator rndGen_;
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
@ -191,7 +191,7 @@ public:
|
|||||||
inline const molecule::constantProperties&
|
inline const molecule::constantProperties&
|
||||||
constProps(label id) const;
|
constProps(label id) const;
|
||||||
|
|
||||||
inline Random& rndGen();
|
inline randomGenerator& rndGen();
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -378,7 +378,7 @@ inline const Foam::molecule::constantProperties&
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Foam::Random& Foam::moleculeCloud::rndGen()
|
inline Foam::randomGenerator& Foam::moleculeCloud::rndGen()
|
||||||
{
|
{
|
||||||
return rndGen_;
|
return rndGen_;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -55,7 +55,7 @@ SourceFiles
|
|||||||
#include "Cloud.H"
|
#include "Cloud.H"
|
||||||
#include "timeIOdictionary.H"
|
#include "timeIOdictionary.H"
|
||||||
#include "autoPtr.H"
|
#include "autoPtr.H"
|
||||||
#include "Random.H"
|
#include "randomGenerator.H"
|
||||||
#include "fvMesh.H"
|
#include "fvMesh.H"
|
||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
#include "fvMatrices.H"
|
#include "fvMatrices.H"
|
||||||
@ -156,7 +156,7 @@ protected:
|
|||||||
const dictionary subModelProperties_;
|
const dictionary subModelProperties_;
|
||||||
|
|
||||||
//- Random number generator - used by some injection routines
|
//- Random number generator - used by some injection routines
|
||||||
mutable Random rndGen_;
|
mutable randomGenerator rndGen_;
|
||||||
|
|
||||||
//- Cell occupancy information for each parcel, (demand driven)
|
//- Cell occupancy information for each parcel, (demand driven)
|
||||||
autoPtr<List<DynamicList<parcelType*>>> cellOccupancyPtr_;
|
autoPtr<List<DynamicList<parcelType*>>> cellOccupancyPtr_;
|
||||||
@ -365,7 +365,7 @@ public:
|
|||||||
// Cloud data
|
// Cloud data
|
||||||
|
|
||||||
//- Return reference to the random object
|
//- Return reference to the random object
|
||||||
inline Random& rndGen() const;
|
inline randomGenerator& rndGen() const;
|
||||||
|
|
||||||
//- Return the cell occupancy information for each
|
//- Return the cell occupancy information for each
|
||||||
// parcel, non-const access, the caller is
|
// parcel, non-const access, the caller is
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -360,7 +360,7 @@ inline Foam::scalar Foam::MomentumCloud<CloudType>::Dmax() const
|
|||||||
|
|
||||||
|
|
||||||
template<class CloudType>
|
template<class CloudType>
|
||||||
inline Foam::Random& Foam::MomentumCloud<CloudType>::rndGen() const
|
inline Foam::randomGenerator& Foam::MomentumCloud<CloudType>::rndGen() const
|
||||||
{
|
{
|
||||||
return rndGen_;
|
return rndGen_;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2012-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -27,7 +27,7 @@ License
|
|||||||
#include "Pstream.H"
|
#include "Pstream.H"
|
||||||
#include "surfaceWriter.H"
|
#include "surfaceWriter.H"
|
||||||
#include "unitConversion.H"
|
#include "unitConversion.H"
|
||||||
#include "Random.H"
|
#include "randomGenerator.H"
|
||||||
#include "triangle.H"
|
#include "triangle.H"
|
||||||
#include "cloud.H"
|
#include "cloud.H"
|
||||||
#include "axesRotation.H"
|
#include "axesRotation.H"
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -71,7 +71,7 @@ Foam::scalar Foam::IsotropyModels::Stochastic<CloudType>::sampleGauss()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Random& rndGen = this->owner().rndGen();
|
randomGenerator& rndGen = this->owner().rndGen();
|
||||||
|
|
||||||
scalar f, m, x, y;
|
scalar f, m, x, y;
|
||||||
|
|
||||||
@ -98,7 +98,7 @@ void Foam::IsotropyModels::Stochastic<CloudType>::calculate()
|
|||||||
{
|
{
|
||||||
const fvMesh& mesh = this->owner().mesh();
|
const fvMesh& mesh = this->owner().mesh();
|
||||||
const scalar deltaT(this->owner().db().time().deltaTValue());
|
const scalar deltaT(this->owner().db().time().deltaTValue());
|
||||||
Random& rndGen = this->owner().rndGen();
|
randomGenerator& rndGen = this->owner().rndGen();
|
||||||
|
|
||||||
const scalar oneBySqrtThree = sqrt(1.0/3.0);
|
const scalar oneBySqrtThree = sqrt(1.0/3.0);
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -100,7 +100,7 @@ Foam::vector Foam::GradientDispersionRAS<CloudType>::update
|
|||||||
scalar& tTurb
|
scalar& tTurb
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Random& rnd = this->owner().rndGen();
|
randomGenerator& rndGen = this->owner().rndGen();
|
||||||
|
|
||||||
const scalar cps = 0.16432;
|
const scalar cps = 0.16432;
|
||||||
|
|
||||||
@ -135,11 +135,11 @@ Foam::vector Foam::GradientDispersionRAS<CloudType>::update
|
|||||||
// prevent this we let fac be both negative/positive
|
// prevent this we let fac be both negative/positive
|
||||||
if (this->owner().mesh().nSolutionD() == 2)
|
if (this->owner().mesh().nSolutionD() == 2)
|
||||||
{
|
{
|
||||||
fac = rnd.scalarNormal();
|
fac = rndGen.scalarNormal();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fac = mag(rnd.scalarNormal());
|
fac = mag(rndGen.scalarNormal());
|
||||||
}
|
}
|
||||||
|
|
||||||
UTurb = sigma*fac*dir;
|
UTurb = sigma*fac*dir;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -71,7 +71,7 @@ Foam::vector Foam::StochasticDispersionRAS<CloudType>::update
|
|||||||
scalar& tTurb
|
scalar& tTurb
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Random& rnd = this->owner().rndGen();
|
randomGenerator& rndGen = this->owner().rndGen();
|
||||||
|
|
||||||
const scalar cps = 0.16432;
|
const scalar cps = 0.16432;
|
||||||
|
|
||||||
@ -99,13 +99,13 @@ Foam::vector Foam::StochasticDispersionRAS<CloudType>::update
|
|||||||
// Calculate a random direction dir distributed uniformly
|
// Calculate a random direction dir distributed uniformly
|
||||||
// in spherical coordinates
|
// in spherical coordinates
|
||||||
|
|
||||||
const scalar theta = rnd.scalar01()*twoPi;
|
const scalar theta = rndGen.scalar01()*twoPi;
|
||||||
const scalar u = 2*rnd.scalar01() - 1;
|
const scalar u = 2*rndGen.scalar01() - 1;
|
||||||
|
|
||||||
const scalar a = sqrt(1 - sqr(u));
|
const scalar a = sqrt(1 - sqr(u));
|
||||||
const vector dir(a*cos(theta), a*sin(theta), u);
|
const vector dir(a*cos(theta), a*sin(theta), u);
|
||||||
|
|
||||||
UTurb = sigma*mag(rnd.scalarNormal())*dir;
|
UTurb = sigma*mag(rndGen.scalarNormal())*dir;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -39,7 +39,7 @@ void Foam::CellZoneInjection<CloudType>::setPositions
|
|||||||
{
|
{
|
||||||
const fvMesh& mesh = this->owner().mesh();
|
const fvMesh& mesh = this->owner().mesh();
|
||||||
|
|
||||||
Random& rnd = this->owner().rndGen();
|
randomGenerator& rndGen = this->owner().rndGen();
|
||||||
|
|
||||||
const label nCells = cellZoneCells.size();
|
const label nCells = cellZoneCells.size();
|
||||||
DynamicList<barycentric> injectorCoordinates(nCells);
|
DynamicList<barycentric> injectorCoordinates(nCells);
|
||||||
@ -85,7 +85,7 @@ void Foam::CellZoneInjection<CloudType>::setPositions
|
|||||||
// Set new particle position and cellId
|
// Set new particle position and cellId
|
||||||
for (label pI = 0; pI < addParticles; pI++)
|
for (label pI = 0; pI < addParticles; pI++)
|
||||||
{
|
{
|
||||||
const scalar volFrac = rnd.sample01<scalar>();
|
const scalar volFrac = rndGen.sample01<scalar>();
|
||||||
label tetI = 0;
|
label tetI = 0;
|
||||||
forAll(cTetVFrac, vfI)
|
forAll(cTetVFrac, vfI)
|
||||||
{
|
{
|
||||||
@ -96,7 +96,7 @@ void Foam::CellZoneInjection<CloudType>::setPositions
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
injectorCoordinates.append(barycentric01(rnd));
|
injectorCoordinates.append(barycentric01(rndGen));
|
||||||
injectorCells.append(celli);
|
injectorCells.append(celli);
|
||||||
injectorTetFaces.append(cellTetIs[tetI].face());
|
injectorTetFaces.append(cellTetIs[tetI].face());
|
||||||
injectorTetPts.append(cellTetIs[tetI].tetPt());
|
injectorTetPts.append(cellTetIs[tetI].tetPt());
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -340,7 +340,7 @@ void Foam::ConeInjection<CloudType>::setPositionAndCell
|
|||||||
label& facei
|
label& facei
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Random& rndGen = this->owner().rndGen();
|
randomGenerator& rndGen = this->owner().rndGen();
|
||||||
|
|
||||||
const scalar t = time - this->SOI_;
|
const scalar t = time - this->SOI_;
|
||||||
|
|
||||||
@ -411,7 +411,7 @@ void Foam::ConeInjection<CloudType>::setProperties
|
|||||||
{
|
{
|
||||||
const polyMesh& mesh = this->owner().mesh();
|
const polyMesh& mesh = this->owner().mesh();
|
||||||
|
|
||||||
Random& rndGen = this->owner().rndGen();
|
randomGenerator& rndGen = this->owner().rndGen();
|
||||||
|
|
||||||
const scalar t = time - this->SOI_;
|
const scalar t = time - this->SOI_;
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -179,8 +179,8 @@ void Foam::MomentumLookupTableInjection<CloudType>::setPositionAndCell
|
|||||||
label injectorI = 0;
|
label injectorI = 0;
|
||||||
if (randomise_)
|
if (randomise_)
|
||||||
{
|
{
|
||||||
Random& rnd = this->owner().rndGen();
|
randomGenerator& rndGen = this->owner().rndGen();
|
||||||
injectorI = rnd.sampleAB<label>(0, injectorCells_.size());
|
injectorI = rndGen.sampleAB<label>(0, injectorCells_.size());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -154,7 +154,7 @@ Foam::label Foam::PatchFlowRateInjection<CloudType>::nParcelsToInject
|
|||||||
|
|
||||||
scalar nParcels = parcelConcentration_*c*flowRate()*dt;
|
scalar nParcels = parcelConcentration_*c*flowRate()*dt;
|
||||||
|
|
||||||
Random& rnd = this->owner().rndGen();
|
randomGenerator& rndGen = this->owner().rndGen();
|
||||||
|
|
||||||
label nParcelsToInject = floor(nParcels);
|
label nParcelsToInject = floor(nParcels);
|
||||||
|
|
||||||
@ -163,7 +163,7 @@ Foam::label Foam::PatchFlowRateInjection<CloudType>::nParcelsToInject
|
|||||||
if
|
if
|
||||||
(
|
(
|
||||||
nParcelsToInject > 0
|
nParcelsToInject > 0
|
||||||
&& nParcels - scalar(nParcelsToInject) > rnd.globalScalar01()
|
&& nParcels - scalar(nParcelsToInject) > rndGen.globalScalar01()
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
++nParcelsToInject;
|
++nParcelsToInject;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -172,7 +172,7 @@ Foam::label Foam::PatchInjection<CloudType>::nParcelsToInject
|
|||||||
{
|
{
|
||||||
scalar nParcels = parcelsPerSecond_->integral(time0, time1);
|
scalar nParcels = parcelsPerSecond_->integral(time0, time1);
|
||||||
|
|
||||||
Random& rnd = this->owner().rndGen();
|
randomGenerator& rndGen = this->owner().rndGen();
|
||||||
|
|
||||||
label nParcelsToInject = floor(nParcels);
|
label nParcelsToInject = floor(nParcels);
|
||||||
|
|
||||||
@ -181,7 +181,7 @@ Foam::label Foam::PatchInjection<CloudType>::nParcelsToInject
|
|||||||
if
|
if
|
||||||
(
|
(
|
||||||
nParcelsToInject > 0
|
nParcelsToInject > 0
|
||||||
&& (nParcels - scalar(nParcelsToInject) > rnd.globalScalar01())
|
&& (nParcels - scalar(nParcelsToInject) > rndGen.globalScalar01())
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
++nParcelsToInject;
|
++nParcelsToInject;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2013-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -26,7 +26,7 @@ License
|
|||||||
#include "patchInjectionBase.H"
|
#include "patchInjectionBase.H"
|
||||||
#include "polyMesh.H"
|
#include "polyMesh.H"
|
||||||
#include "SubField.H"
|
#include "SubField.H"
|
||||||
#include "Random.H"
|
#include "randomGenerator.H"
|
||||||
#include "triPointRef.H"
|
#include "triPointRef.H"
|
||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
#include "polyMeshTetDecomposition.H"
|
#include "polyMeshTetDecomposition.H"
|
||||||
@ -132,7 +132,7 @@ void Foam::patchInjectionBase::topoChange(const polyMesh& mesh)
|
|||||||
void Foam::patchInjectionBase::setPositionAndCell
|
void Foam::patchInjectionBase::setPositionAndCell
|
||||||
(
|
(
|
||||||
const fvMesh& mesh,
|
const fvMesh& mesh,
|
||||||
Random& rnd,
|
randomGenerator& rndGen,
|
||||||
barycentric& coordinates,
|
barycentric& coordinates,
|
||||||
label& celli,
|
label& celli,
|
||||||
label& tetFacei,
|
label& tetFacei,
|
||||||
@ -161,7 +161,7 @@ void Foam::patchInjectionBase::setPositionAndCell
|
|||||||
|
|
||||||
const polyPatch& patch = mesh.boundaryMesh()[patchId_];
|
const polyPatch& patch = mesh.boundaryMesh()[patchId_];
|
||||||
|
|
||||||
scalar area = rnd.globalScalar01()*sumProcArea_.last();
|
scalar area = rndGen.globalScalar01()*sumProcArea_.last();
|
||||||
|
|
||||||
if (patch.size() > 0)
|
if (patch.size() > 0)
|
||||||
{
|
{
|
||||||
@ -179,7 +179,7 @@ void Foam::patchInjectionBase::setPositionAndCell
|
|||||||
findArea(sumFaceTriArea_[patchFacei], area);
|
findArea(sumFaceTriArea_[patchFacei], area);
|
||||||
|
|
||||||
// Set the topology
|
// Set the topology
|
||||||
const barycentric2D r = barycentric2D01(rnd);
|
const barycentric2D r = barycentric2D01(rndGen);
|
||||||
coordinates = barycentric(0, r.a(), r.b(), r.c());
|
coordinates = barycentric(0, r.a(), r.b(), r.c());
|
||||||
celli = mesh.faceOwner()[patch.start() + patchFacei];
|
celli = mesh.faceOwner()[patch.start() + patchFacei];
|
||||||
tetFacei = patch.start() + patchFacei;
|
tetFacei = patch.start() + patchFacei;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -56,7 +56,7 @@ namespace Foam
|
|||||||
// Forward class declarations
|
// Forward class declarations
|
||||||
class polyMesh;
|
class polyMesh;
|
||||||
class fvMesh;
|
class fvMesh;
|
||||||
class Random;
|
class randomGenerator;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class patchInjectionBase Declaration
|
Class patchInjectionBase Declaration
|
||||||
@ -108,7 +108,7 @@ public:
|
|||||||
virtual void setPositionAndCell
|
virtual void setPositionAndCell
|
||||||
(
|
(
|
||||||
const fvMesh& mesh,
|
const fvMesh& mesh,
|
||||||
Random& rnd,
|
randomGenerator& rndGen,
|
||||||
barycentric& coordinates,
|
barycentric& coordinates,
|
||||||
label& celli,
|
label& celli,
|
||||||
label& tetFacei,
|
label& tetFacei,
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -179,8 +179,8 @@ void Foam::ReactingLookupTableInjection<CloudType>::setPositionAndCell
|
|||||||
label injectorI = 0;
|
label injectorI = 0;
|
||||||
if (randomise_)
|
if (randomise_)
|
||||||
{
|
{
|
||||||
Random& rnd = this->owner().rndGen();
|
randomGenerator& rndGen = this->owner().rndGen();
|
||||||
injectorI = rnd.sampleAB<label>(0, injectorCells_.size());
|
injectorI = rndGen.sampleAB<label>(0, injectorCells_.size());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -185,8 +185,8 @@ void Foam::ReactingMultiphaseLookupTableInjection<CloudType>::setPositionAndCell
|
|||||||
label injectorI = 0;
|
label injectorI = 0;
|
||||||
if (randomise_)
|
if (randomise_)
|
||||||
{
|
{
|
||||||
Random& rnd = this->owner().rndGen();
|
randomGenerator& rndGen = this->owner().rndGen();
|
||||||
injectorI = rnd.sampleAB<label>(0, injectorCells_.size());
|
injectorI = rndGen.sampleAB<label>(0, injectorCells_.size());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -133,7 +133,7 @@ public:
|
|||||||
const vector& injectionPos,
|
const vector& injectionPos,
|
||||||
const scalar pAmbient,
|
const scalar pAmbient,
|
||||||
const scalar chi,
|
const scalar chi,
|
||||||
Random& rndGen
|
randomGenerator& rndGen
|
||||||
) const = 0;
|
) const = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -92,7 +92,7 @@ void Foam::BlobsSheetAtomisation<CloudType>::update
|
|||||||
const vector& injectionPos,
|
const vector& injectionPos,
|
||||||
const scalar pAmbient,
|
const scalar pAmbient,
|
||||||
const scalar chi,
|
const scalar chi,
|
||||||
Random& rndGen
|
randomGenerator& rndGen
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
scalar lBU =
|
scalar lBU =
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -117,7 +117,7 @@ public:
|
|||||||
const vector& injectionPos,
|
const vector& injectionPos,
|
||||||
const scalar pAmbient,
|
const scalar pAmbient,
|
||||||
const scalar chi,
|
const scalar chi,
|
||||||
Random& rndGen
|
randomGenerator& rndGen
|
||||||
) const;
|
) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -116,7 +116,7 @@ void Foam::LISAAtomisation<CloudType>::update
|
|||||||
const vector& injectionPos,
|
const vector& injectionPos,
|
||||||
const scalar pAmbient,
|
const scalar pAmbient,
|
||||||
const scalar chi,
|
const scalar chi,
|
||||||
Random& rndGen
|
randomGenerator& rndGen
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
if (volFlowRate < small)
|
if (volFlowRate < small)
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -138,7 +138,7 @@ public:
|
|||||||
const vector& injectionPos,
|
const vector& injectionPos,
|
||||||
const scalar pAmbient,
|
const scalar pAmbient,
|
||||||
const scalar chi,
|
const scalar chi,
|
||||||
Random& rndGen
|
randomGenerator& rndGen
|
||||||
) const;
|
) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -88,7 +88,7 @@ void Foam::NoAtomisation<CloudType>::update
|
|||||||
const vector& injectionPos,
|
const vector& injectionPos,
|
||||||
const scalar pAmbient,
|
const scalar pAmbient,
|
||||||
const scalar chi,
|
const scalar chi,
|
||||||
Random& rndGen
|
randomGenerator& rndGen
|
||||||
) const
|
) const
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -99,7 +99,7 @@ public:
|
|||||||
const vector& injectionPos,
|
const vector& injectionPos,
|
||||||
const scalar pAmbient,
|
const scalar pAmbient,
|
||||||
const scalar chi,
|
const scalar chi,
|
||||||
Random& rndGen
|
randomGenerator& rndGen
|
||||||
) const;
|
) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -139,7 +139,7 @@ bool Foam::SHF<CloudType>::update
|
|||||||
scalar& massChild
|
scalar& massChild
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Random& rndGen = this->owner().rndGen();
|
randomGenerator& rndGen = this->owner().rndGen();
|
||||||
|
|
||||||
bool addChild = false;
|
bool addChild = false;
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -111,7 +111,7 @@ bool Foam::TAB<CloudType>::update
|
|||||||
scalar& massChild
|
scalar& massChild
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Random& rndGen = this->owner().rndGen();
|
randomGenerator& rndGen = this->owner().rndGen();
|
||||||
|
|
||||||
scalar r = 0.5*d;
|
scalar r = 0.5*d;
|
||||||
scalar r2 = r*r;
|
scalar r2 = r*r;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -180,8 +180,8 @@ void Foam::ThermoLookupTableInjection<CloudType>::setPositionAndCell
|
|||||||
label injectorI = 0;
|
label injectorI = 0;
|
||||||
if (randomise_)
|
if (randomise_)
|
||||||
{
|
{
|
||||||
Random& rnd = this->owner().rndGen();
|
randomGenerator& rndGen = this->owner().rndGen();
|
||||||
injectorI = rnd.sampleAB<label>(0, injectorCells_.size());
|
injectorI = rndGen.sampleAB<label>(0, injectorCells_.size());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -202,15 +202,15 @@ Foam::forceSuSp Foam::BrownianMotionForce<CloudType>::calcCoupled
|
|||||||
|
|
||||||
// To generate a spherical distribution:
|
// To generate a spherical distribution:
|
||||||
|
|
||||||
Random& rnd = this->owner().rndGen();
|
randomGenerator& rndGen = this->owner().rndGen();
|
||||||
|
|
||||||
const scalar theta = rnd.scalar01()*twoPi;
|
const scalar theta = rndGen.scalar01()*twoPi;
|
||||||
const scalar u = 2*rnd.scalar01() - 1;
|
const scalar u = 2*rndGen.scalar01() - 1;
|
||||||
|
|
||||||
const scalar a = sqrt(1 - sqr(u));
|
const scalar a = sqrt(1 - sqr(u));
|
||||||
const vector dir(a*cos(theta), a*sin(theta), u);
|
const vector dir(a*cos(theta), a*sin(theta), u);
|
||||||
|
|
||||||
value.Su() = f*mag(rnd.scalarNormal())*dir;
|
value.Su() = f*mag(rndGen.scalarNormal())*dir;
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -46,7 +46,7 @@ SourceFiles
|
|||||||
#define BrownianMotionForce_H
|
#define BrownianMotionForce_H
|
||||||
|
|
||||||
#include "ParticleForce.H"
|
#include "ParticleForce.H"
|
||||||
#include "Random.H"
|
#include "randomGenerator.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ class BrownianMotionForce
|
|||||||
// Private Data
|
// Private Data
|
||||||
|
|
||||||
//- Reference to the cloud random number generator
|
//- Reference to the cloud random number generator
|
||||||
Random& rndGen_;
|
randomGenerator& rndGen_;
|
||||||
|
|
||||||
//- Molecular free path length [m]
|
//- Molecular free path length [m]
|
||||||
const scalar lambda_;
|
const scalar lambda_;
|
||||||
|
|||||||
@ -51,7 +51,7 @@ License
|
|||||||
#include "meshTools.H"
|
#include "meshTools.H"
|
||||||
#include "OFstream.H"
|
#include "OFstream.H"
|
||||||
#include "geomDecomp.H"
|
#include "geomDecomp.H"
|
||||||
#include "Random.H"
|
#include "randomGenerator.H"
|
||||||
#include "searchableSurfaces.H"
|
#include "searchableSurfaces.H"
|
||||||
#include "treeBoundBox.H"
|
#include "treeBoundBox.H"
|
||||||
#include "fvMeshTools.H"
|
#include "fvMeshTools.H"
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -26,7 +26,7 @@ License
|
|||||||
#include "extendedEdgeMesh.H"
|
#include "extendedEdgeMesh.H"
|
||||||
#include "surfaceFeatures.H"
|
#include "surfaceFeatures.H"
|
||||||
#include "triSurface.H"
|
#include "triSurface.H"
|
||||||
#include "Random.H"
|
#include "randomGenerator.H"
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
#include "OBJstream.H"
|
#include "OBJstream.H"
|
||||||
#include "DynamicField.H"
|
#include "DynamicField.H"
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user