ENH: Random numbers - updated dependent code from change to cachedRandom class

This commit is contained in:
Andrew Heather
2017-04-27 15:24:52 +01:00
parent 02205ef167
commit 88a03de238
6 changed files with 6 additions and 13 deletions

View File

@ -746,7 +746,7 @@ turbulentDFSEMInletFvPatchVectorField
nCellPerEddy_(5), nCellPerEddy_(5),
patchNormal_(vector::zero), patchNormal_(vector::zero),
v0_(0), v0_(0),
rndGen_(0, -1), rndGen_(),
sigmax_(size(), 0), sigmax_(size(), 0),
maxSigmaX_(0), maxSigmaX_(0),
nEddy_(0), nEddy_(0),

View File

@ -71,7 +71,6 @@ SourceFiles
#include "surfaceFieldsFwd.H" #include "surfaceFieldsFwd.H"
#include "vectorList.H" #include "vectorList.H"
#include "globalIndex.H" #include "globalIndex.H"
#include "cachedRandom.H"
#include "eulerianParticle.H" #include "eulerianParticle.H"
#include "IOdictionary.H" #include "IOdictionary.H"
#include "injectedParticleCloud.H" #include "injectedParticleCloud.H"

View File

@ -61,7 +61,7 @@ Foam::functionObjects::particleDistribution::particleDistribution
cloudName_("unknown-cloudName"), cloudName_("unknown-cloudName"),
nameVsBinWidth_(), nameVsBinWidth_(),
tagFieldName_("none"), tagFieldName_("none"),
rndGen_(1234, -1), rndGen_(),
writerPtr_(nullptr) writerPtr_(nullptr)
{ {
read(dict); read(dict);

View File

@ -316,13 +316,7 @@ Foam::KinematicCloud<CloudType>::KinematicCloud
( (
particleProperties_.subOrEmptyDict("subModels", solution_.active()) particleProperties_.subOrEmptyDict("subModels", solution_.active())
), ),
rndGen_ rndGen_(),
(
label(0),
solution_.steadyState() ?
particleProperties_.lookupOrDefault<label>("randomSampleSize", 100000)
: -1
),
cellOccupancyPtr_(), cellOccupancyPtr_(),
cellLengthScale_(cbrt(mesh_.V())), cellLengthScale_(cbrt(mesh_.V())),
rho_(rho), rho_(rho),
@ -515,7 +509,7 @@ Foam::KinematicCloud<CloudType>::KinematicCloud
solution_(mesh), solution_(mesh),
constProps_(), constProps_(),
subModelProperties_(dictionary::null), subModelProperties_(dictionary::null),
rndGen_(0, 0), rndGen_(),
cellOccupancyPtr_(nullptr), cellOccupancyPtr_(nullptr),
cellLengthScale_(c.cellLengthScale_), cellLengthScale_(c.cellLengthScale_),
rho_(c.rho_), rho_(c.rho_),

View File

@ -99,7 +99,7 @@ contactAngleForce::contactAngleForce
: :
force(typeName, owner, dict), force(typeName, owner, dict),
Ccf_(readScalar(coeffDict_.lookup("Ccf"))), Ccf_(readScalar(coeffDict_.lookup("Ccf"))),
rndGen_(label(0), -1), rndGen_(),
distribution_ distribution_
( (
distributionModels::distributionModel::New distributionModels::distributionModel::New

View File

@ -57,7 +57,7 @@ drippingInjection::drippingInjection
injectionModel(type(), owner, dict), injectionModel(type(), owner, dict),
deltaStable_(readScalar(coeffDict_.lookup("deltaStable"))), deltaStable_(readScalar(coeffDict_.lookup("deltaStable"))),
particlesPerParcel_(readScalar(coeffDict_.lookup("particlesPerParcel"))), particlesPerParcel_(readScalar(coeffDict_.lookup("particlesPerParcel"))),
rndGen_(label(0), -1), rndGen_(),
parcelDistribution_ parcelDistribution_
( (
distributionModels::distributionModel::New distributionModels::distributionModel::New