33 namespace distributions
58 return -
exp(- lambda_*
x);
80 min_(
dict.lookupBackwardsCompatible<scalar>({
"min",
"minValue"},
units)),
81 max_(
dict.lookupBackwardsCompatible<scalar>({
"max",
"maxValue"},
units)),
85 validatePositive(
dict);
113 const scalar
s = rndGen_.sample01<scalar>();
115 const scalar PhiS = (1 -
s)*Phi01[0] +
s*Phi01[1];
116 return - 1/lambda_*
log(- PhiS);
Macros for easy insertion into run-time selection tables.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Base class for statistical distributions.
virtual tmp< scalarField > plotX(const label n) const
Return coordinates to plot across the range of the distribution.
Exponential distribution, scaled so that it spans between a specified minimum and maximum value,...
exponential(const unitConversion &units, const dictionary &dict, const label sampleQ, randomGenerator &&rndGen)
Construct from a dictionary.
virtual scalar min() const
Return the minimum value.
virtual void write(Ostream &os, const unitConversion &units) const
Write to a stream.
virtual scalar sampleForZeroQ() const
Sample the distribution for zero effective size exponent.
virtual scalar max() const
Return the maximum value.
virtual tmp< scalarField > plotX(const label n) const
Return coordinates to plot across the range of the distribution.
virtual ~exponential()
Destructor.
Base class for distributions that have a closed integral form for the cumulative density function (CD...
A class for managing temporary objects.
T & ref() const
Return non-const reference or generate a fatal error.
Unit conversion structure. Contains the associated dimensions and the multiplier with which to conver...
volScalarField scalarField(fieldObject, mesh)
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(lagrangian::Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(lagrangian::Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(lagrangian::Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.name(), lagrangian::cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
defineTypeNameAndDebug(exponential, 0)
addToRunTimeSelectionTable(distribution, exponential, dictionary)
void write(std::ostream &os, const bool binary, List< floatScalar > &fField)
Write floats ascii or binary.
dimensionedScalar exp(const dimensionedScalar &ds)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
scalar integerPow(const scalar x, const label e)
Compute the power of the number x to the integer e.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dimensionedScalar log(const dimensionedScalar &ds)
const HashTable< unitConversion > & units()
Get the table of unit conversions.
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
const unitConversion unitless
randomGenerator rndGen(653213)