44 <<
type() <<
": The maximum value is smaller than the minimum "
45 <<
"value:" <<
nl <<
" max = " <<
max() <<
", min = "
56 <<
type() <<
": The minimum value must be greater than "
57 <<
"zero." <<
nl <<
" min = " <<
min()
85 Q_(
dict.lookup<scalar>(
"Q")),
92 <<
name <<
": Size exponent cannot be negative" <<
nl
99 <<
name <<
": Sampling size exponent cannot be negative" <<
nl
149 const scalar x0 =
min(), x1 =
max(), d = 0.1*(x1 - x0);
155 result[1] = x0*(1 -
sign(x0)*small);
156 result[2] = x0*(1 +
sign(x0)*small);
158 for (
label i = 3; i <
n - 3; ++ i)
160 const scalar
f = scalar(i - 2)/(
n - 5);
162 result[i] = (1 -
f)*x0 +
f*x1;
165 result[
n - 3] = x1*(1 -
sign(x1)*small);
166 result[
n - 2] = x1*(1 +
sign(x1)*small);
167 result[
n - 1] = x1 + d;
181 const bool writeState
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A list of keyword definitions, which are a keyword followed by any number of values (e....
Base class for statistical distributions.
virtual scalar max() const =0
Return the maximum value.
virtual void writeState(Ostream &os) const
Write the state to a stream.
virtual void validatePositive(const dictionary &dict) const
Validate that the lower bound is positive.
tmp< scalarField > clipPDF(const scalarField &x, const tmp< scalarField > &pdf) const
Clip the PDF values to zero outside the bounds.
const label Q_
Distribution size exponent.
virtual ~distribution()
Destructor.
virtual tmp< scalarField > x(const label n) const
Return coordinates to plot across the range of the distribution.
const label sampleQ_
Sample size exponent.
distribution(const word &name, const unitConversion &units, const dictionary &dict, const label sampleQ, randomGenerator &&rndGen)
Construct from dictionary.
virtual void validateBounds(const dictionary &dict) const
Validate that the bounds are monotonic.
virtual void write(Ostream &os, const unitConversion &units) const
Write to a stream.
virtual scalar min() const =0
Return the minimum value.
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...
A class for handling words, derived from string.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void write(std::ostream &os, const bool binary, List< floatScalar > &fField)
Write floats ascii or binary.
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
dimensionedScalar pos0(const dimensionedScalar &ds)
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
dimensionedScalar sign(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.
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const bool)
Return a word representation of a bool.
errorManip< error > abort(error &err)
Ostream & incrIndent(Ostream &os)
Increment the indent level.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
const HashTable< unitConversion > & units()
Get the table of unit conversions.
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
defineTypeNameAndDebug(combustionModel, 0)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
Ostream & indent(Ostream &os)
Indent stream.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
randomGenerator rndGen(653213)