44 overlapPercent_(
dict.
get<scalar>(
"overlapPercent")),
45 nOverlapSamples_(floor(overlapPercent_/scalar(100)*
nSamples)),
46 nWindow_(
dict.getOrDefault(
"nWindow", -1))
60 return overlapPercent_;
66 return nOverlapSamples_;
92 <<
" is larger than total number of data points = " << nSamplesTotal
96 const label nWindowAvailable = nWindowsTotal(nSamplesTotal);
100 nWindow_ = nWindowAvailable;
103 if (nWindow_ > nWindowAvailable)
106 <<
"Number of data points calculated with " << nWindow_
107 <<
" windows greater than the total number of data points" 110 <<
" Total number of data points = " << nSamplesTotal <<
nl 111 <<
" Maximum number of windows = " << nWindowAvailable <<
nl 112 <<
" Requested number of windows = " << nWindow_
116 const label nRequiredSamples =
117 nWindow_*
nSamples - (nWindow_ - 1)*nOverlapSamples_;
120 <<
" Total samples : " << nSamplesTotal <<
nl 122 <<
" Number of windows : " << nWindow_ <<
nl 123 <<
" Overlap size : " << nOverlapSamples_ <<
nl 124 <<
" Required number of samples : " << nRequiredSamples
127 return nRequiredSamples;
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
errorManipArg< error, int > exit(error &err, const int errNo=1)
label validate(label n)
Validate that the window is applicable to the data set size, and.
label nWindowsTotal(label nSamplesTotal) const
Return the total number of windows for a given number of samples.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
label nWindow() const
Return the number of windows.
const label nSamples(pdfDictionary.get< label >("nSamples"))
windowModel(const dictionary &dict, const label nSamples)
Construct from dictionary.
Base class for windowing models.
label nSamples() const
Return the number of samples in the window.
scalar overlapPercent() const
Return the overlap percent.
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
defineTypeNameAndDebug(combustionModel, 0)
label nOverlapSamples() const
Return number of overlap samples per window.
messageStream Info
Information stream (stdout output on master, null elsewhere)
label size() const noexcept
The number of elements in the UList.