56 for (
label i = 0; i <
x.size() - 1; ++ i)
58 const label j0 = i*(
n - 1)/(
x.size() - 1);
59 const label j1 = (i + 1)*(
n - 1)/(
x.size() - 1);
65 const scalar
f = scalar(j -
j0)/(
j1 -
j0);
67 xx[j] = (1 -
f)*
x[i] +
f*
x[i + 1];
77 const label i = j*(
x.size() - 1)/(
n - 1);
90 const tmp<scalarField>&
x
98 return refined(
n,
x());
106 const scalar fraction,
119 integralSS/integralSS.
last(),
137 n_((1<<
dict.lookupOrDefault<
label>(
"level", 16)) + 1)
150 Info<<
"Selecting " << waveSpectrum::typeName <<
" " <<
type <<
endl;
153 dictionaryConstructorTable::iterator cstrIter =
154 dictionaryConstructorTablePtr_->find(
type);
156 if (cstrIter == dictionaryConstructorTablePtr_->end())
159 <<
"Unknown " << waveSpectrum::typeName <<
" " <<
type <<
nl <<
nl
160 <<
"Valid spectrum types are:" <<
nl
161 << dictionaryConstructorTablePtr_->sortedToc()
#define forAll(list, i)
Loop across all elements in list.
void size(const label)
Override size to be inconsistent with allocated storage.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
T & last()
Return the last element of the list.
A list of keyword definitions, which are a keyword followed by any number of values (e....
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
const dictionary & optionalSubDict(const word &) const
Find and return a sub-dictionary if found.
scalar sample() const
Sample the distribution.
static tmp< scalarField > integrate(const scalarField &x, const scalarField &y)
Integrate the values y with respect to the coordinates x.
static tmp< scalarField > integrateX(const scalarField &x, const scalarField &y)
Integrate the values x*y with respect to the coordinates x.
A class for managing temporary objects.
Base class for wave spectra.
waveSpectrum(const waveSpectrum &spectrum)
Construct a copy.
virtual ~waveSpectrum()
Destructor.
static autoPtr< waveSpectrum > New(const dictionary &dict, const scalar g)
Select given a dictionary and gravity.
scalar fFraction(const scalar fraction, const scalar f1) const
Return the frequency below which a given fraction of the spectrum's.
virtual void write(Ostream &os) const
Write.
virtual tmp< scalarField > integralFS(const scalarField &f) const
Evaluate the integral of the wave spectral density multiplied by.
virtual tmp< scalarField > integralS(const scalarField &f) const
Evaluate the integral of the wave spectral density at the given.
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
volScalarField scalarField(fieldObject, mesh)
const FieldField< fvPatchField, Type > & ff(const FieldField< fvPatchField, Type > &bf)
tmp< fvMatrix< Type > > S(const Pair< tmp< volScalarField::Internal >> &, const VolField< Type > &)
errorManipArg< error, int > exit(error &err, const int errNo=1)
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
dimensionedScalar j1(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
List< scalar > scalarList
A List of scalars.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
defineTypeNameAndDebug(combustionModel, 0)
dimensionedScalar j0(const dimensionedScalar &ds)
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.