44 overlapPercent_(
dict.get<scalar>(
"overlapPercent")),
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;
bool get(const label i) const
label size() const noexcept
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Base class for windowing models.
scalar overlapPercent() const
Return the overlap percent.
label nWindow() const
Return the number of windows.
label nWindowsTotal(label nSamplesTotal) const
Return the total number of windows for a given number of samples.
label nSamples() const
Return the number of samples in the window.
label nWindow_
Number of windows.
windowModel(const dictionary &dict, const label nSamples)
Construct from dictionary.
label validate(label n)
Validate that the window is applicable to the data set size, and.
label nOverlapSamples_
Number of overlap samples per window.
scalar overlapPercent_
Overlap percent.
label nOverlapSamples() const
Return number of overlap samples per window.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
messageStream Info
Information stream (stdout output on master, null elsewhere).
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Ostream & endl(Ostream &os)
Add newline and flush stream.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a).
#define defineRunTimeSelectionTable(baseType, argNames)
Define run-time selection table.
const label nSamples(pdfDictionary.get< label >("nSamples"))