windowModel Class Reference

Base class for windowing models. More...

Inheritance diagram for windowModel:
[legend]
Collaboration diagram for windowModel:
[legend]

Public Member Functions

 TypeName ("windowModel")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, windowModel, dictionary,(const dictionary &dict, const label nSamples),(dict, nSamples))
 
 windowModel (const dictionary &dict, const label nSamples)
 Construct from dictionary. More...
 
virtual ~windowModel ()=default
 Destructor. More...
 
label nSamples () const
 Return the number of samples in the window. More...
 
label nWindow () const
 Return the number of windows. More...
 
label nWindowsTotal (label nSamplesTotal) const
 Return the total number of windows for a given number of samples. More...
 
label validate (label n)
 Validate that the window is applicable to the data set size, and. More...
 
template<class Type >
tmp< Field< Type > > apply (const Field< Type > &fld, const label windowI) const
 Return the windowed data. More...
 
template<class Type >
Foam::tmp< Foam::Field< Type > > apply (const Field< Type > &fld, const label windowI) const
 
- Public Member Functions inherited from Field< scalar >
constexpr Field () noexcept
 Default construct. More...
 
 Field (const label len)
 Construct given size. More...
 
 Field (const label len, const scalar &val)
 Construct given size and initial value. More...
 
 Field (const label len, const Foam::zero)
 Construct given size and initial values of zero. More...
 
 Field (const Foam::one, const scalar &val)
 Construct with length=1, copying the value as the only content. More...
 
 Field (const Foam::one, scalar &&val)
 Construct with length=1, moving the value as the only content. More...
 
 Field (const Foam::one, const Foam::zero)
 Construct with length=1, initializing content to zero. More...
 
 Field (const Field< scalar > &fld)
 Copy construct. More...
 
 Field (const UList< scalar > &list)
 Copy construct from UList<Type> More...
 
 Field (const IndirectListBase< scalar, Addr > &list)
 Copy construct from IndirectList. More...
 
 Field (Field< scalar > &&fld)
 Move construct from Field. More...
 
 Field (List< scalar > &&list)
 Move construct from List. More...
 
 Field (DynamicList< scalar, SizeMin > &&list)
 Move construct from DynamicList. More...
 
 Field (const UList< scalar > &mapF, const labelUList &mapAddressing)
 Construct by 1 to 1 mapping from the given field. More...
 
 Field (const tmp< Field< scalar >> &tmapF, const labelUList &mapAddressing)
 Construct by 1 to 1 mapping from the given tmp field. More...
 
 Field (const UList< scalar > &mapF, const labelListList &mapAddressing, const scalarListList &weights)
 Construct by interpolative mapping from the given field. More...
 
 Field (const tmp< Field< scalar >> &tmapF, const labelListList &mapAddressing, const scalarListList &weights)
 Construct by interpolative mapping from the given tmp field. More...
 
 Field (const UList< scalar > &mapF, const FieldMapper &map, const bool applyFlip=true)
 Construct by mapping from the given field. More...
 
 Field (const UList< scalar > &mapF, const FieldMapper &map, const scalar &defaultValue, const bool applyFlip=true)
 Construct by mapping from the given field. More...
 
 Field (const UList< scalar > &mapF, const FieldMapper &map, const UList< scalar > &defaultValues, const bool applyFlip=true)
 Construct by mapping from the given field. More...
 
 Field (const tmp< Field< scalar >> &tmapF, const FieldMapper &map, const bool applyFlip=true)
 Construct by mapping from the given tmp field. More...
 
 Field (const tmp< Field< scalar >> &tmapF, const FieldMapper &map, const scalar &defaultValue, const bool applyFlip=true)
 
 Field (const tmp< Field< scalar >> &tmapF, const FieldMapper &map, const UList< scalar > &defaultValues, const bool applyFlip=true)
 
 Field (Field< scalar > &fld, bool reuse)
 Copy construct or re-use as specified. More...
 
 Field (const tmp< Field< scalar >> &tfld)
 Copy or move construct from tmp. More...
 
 Field (Istream &is)
 Construct from Istream. More...
 
 Field (const word &keyword, const dictionary &dict, const label len)
 Construct from a dictionary entry. More...
 
tmp< Field< scalar > > clone () const
 Clone. More...
 
void map (const UList< scalar > &mapF, const labelUList &mapAddressing)
 1 to 1 map from the given field More...
 
void map (const tmp< Field< scalar >> &tmapF, const labelUList &mapAddressing)
 1 to 1 map from the given tmp field More...
 
void map (const UList< scalar > &mapF, const labelListList &mapAddressing, const scalarListList &weights)
 Interpolative map from the given field. More...
 
void map (const tmp< Field< scalar >> &tmapF, const labelListList &mapAddressing, const scalarListList &weights)
 Interpolative map from the given tmp field. More...
 
void map (const UList< scalar > &mapF, const FieldMapper &map, const bool applyFlip=true)
 Map from the given field. More...
 
void map (const tmp< Field< scalar >> &tmapF, const FieldMapper &map, const bool applyFlip=true)
 Map from the given tmp field. More...
 
void autoMap (const FieldMapper &map, const bool applyFlip=true)
 Map from self. More...
 
void rmap (const UList< scalar > &mapF, const labelUList &mapAddressing)
 1 to 1 reverse-map from the given field More...
 
void rmap (const tmp< Field< scalar >> &tmapF, const labelUList &mapAddressing)
 1 to 1 reverse-map from the given tmp field More...
 
void rmap (const UList< scalar > &mapF, const labelUList &mapAddressing, const UList< scalar > &weights)
 Interpolative reverse map from the given field. More...
 
void rmap (const tmp< Field< scalar >> &tmapF, const labelUList &mapAddressing, const UList< scalar > &weights)
 Interpolative reverse map from the given tmp field. More...
 
void negate ()
 Negate this field (negative). More...
 
tmp< Field< cmptType > > component (const direction) const
 Return a component field of the field. More...
 
void replace (const direction, const UList< cmptType > &)
 Replace a component field of the field. More...
 
void replace (const direction, const tmp< Field< cmptType >> &)
 Replace a component field of the field. More...
 
void replace (const direction, const cmptType &)
 Replace a component field of the field. More...
 
VSForm block (const label start) const
 
tmp< Field< scalar > > T () const
 Return the field transpose (only defined for second rank tensors) More...
 
void writeEntry (const word &keyword, Ostream &os) const
 Write the field as a dictionary entry. More...
 
SubField< scalar > slice (const label pos, label len=-1)
 Return SubField slice (non-const access) - no range checking. More...
 
const SubField< scalar > slice (const label pos, label len=-1) const
 Return SubField slice (const access) - no range checking. More...
 
SubField< scalar > slice (const labelRange &range)
 Return SubField slice (non-const access) - with range checking. More...
 
const SubField< scalar > slice (const labelRange &range) const
 Return SubField slice (const access) - with range checking. More...
 
void operator= (const Field< scalar > &)
 Copy assignment. More...
 
void operator= (const tmp< Field< scalar >> &)
 
void operator= (const UList< scalar > &rhs)
 
void operator= (const SubField< scalar > &rhs)
 
void operator= (const IndirectListBase< scalar, Addr > &rhs)
 Copy assign from IndirectList. More...
 
void operator= (Field< scalar > &&rhs)
 Move assignment. More...
 
void operator= (List< scalar > &&rhs)
 
void operator= (DynamicList< scalar, SizeMin > &&rhs)
 
void operator= (const scalar &val)
 Value assignment. More...
 
void operator= (const Foam::zero)
 
void operator= (const VectorSpace< Form, Cmpt, nCmpt > &)
 
void operator= (const tmp< Field > &rhs)
 
void operator+= (const UList< scalar > &)
 
void operator+= (const tmp< Field< scalar >> &)
 
void operator+= (const scalar &)
 
void operator-= (const UList< scalar > &)
 
void operator-= (const tmp< Field< scalar >> &)
 
void operator-= (const scalar &)
 
void operator*= (const UList< scalar > &)
 
void operator*= (const tmp< Field< scalar >> &)
 
void operator*= (const scalar &)
 
void operator/= (const UList< scalar > &)
 
void operator/= (const tmp< Field< scalar >> &)
 
void operator/= (const scalar &)
 

Static Public Member Functions

static autoPtr< windowModelNew (const dictionary &dict, const label nSamples)
 Return a reference to the selected window model. More...
 
- Static Public Member Functions inherited from Field< scalar >
static const Field< scalar > & null ()
 Return nullObject reference Field. More...
 
static autoPtr< Field< scalar > > New (Istream &is)
 Return a pointer to a new Field created on freestore. More...
 
static tmp< Field< scalar > > NewCalculatedType (const Field< Type2 > &f)
 

Protected Attributes

label nOverlapSamples_
 Number of overlap samples per window. More...
 
label nWindow_
 Number of windows. More...
 

Additional Inherited Members

- Public Types inherited from Field< scalar >
typedef pTraits< scalar >::cmptType cmptType
 Component type. More...
 
typedef SubField< scalar > subField
 Declare type of subField. More...
 

Detailed Description

Base class for windowing models.

Source files

Definition at line 52 of file windowModel.H.

Constructor & Destructor Documentation

◆ windowModel()

windowModel ( const dictionary dict,
const label  nSamples 
)

Construct from dictionary.

Definition at line 41 of file windowModel.C.

References dict, windowModel::nOverlapSamples_, and windowModel::nSamples().

Here is the call graph for this function:

◆ ~windowModel()

virtual ~windowModel ( )
virtualdefault

Destructor.

Member Function Documentation

◆ TypeName()

TypeName ( "windowModel"  )

Runtime type information.

◆ declareRunTimeSelectionTable()

declareRunTimeSelectionTable ( autoPtr  ,
windowModel  ,
dictionary  ,
(const dictionary &dict, const label nSamples ,
(dict, nSamples  
)

◆ New()

Foam::autoPtr< Foam::windowModel > New ( const dictionary dict,
const label  nSamples 
)
static

Return a reference to the selected window model.

Definition at line 33 of file windowModelNew.C.

References dict, Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInLookup, Foam::Info, and nSamples().

Referenced by noiseModel::read().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nSamples()

Foam::label nSamples ( ) const

Return the number of samples in the window.

Definition at line 56 of file windowModel.C.

Referenced by surfaceNoise::calculate(), Hanning::Hanning(), noiseFFT::meanPf(), pointNoise::processData(), noiseFFT::PSDf(), noiseFFT::RMSmeanPf(), and windowModel::windowModel().

Here is the caller graph for this function:

◆ nWindow()

Foam::label nWindow ( ) const

Return the number of windows.

Definition at line 62 of file windowModel.C.

Referenced by noiseFFT::meanPf(), noiseFFT::PSDf(), and noiseFFT::RMSmeanPf().

Here is the caller graph for this function:

◆ nWindowsTotal()

Foam::label nWindowsTotal ( label  nSamplesTotal) const

Return the total number of windows for a given number of samples.

Definition at line 68 of file windowModel.C.

References nSamples().

Here is the call graph for this function:

◆ validate()

Foam::label validate ( label  n)

Validate that the window is applicable to the data set size, and.

return the number of required data points

Definition at line 76 of file windowModel.C.

References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::Info, Foam::nl, and nSamples().

Here is the call graph for this function:

◆ apply() [1/2]

tmp<Field<Type> > apply ( const Field< Type > &  fld,
const label  windowI 
) const

Return the windowed data.

Referenced by noiseFFT::meanPf(), noiseFFT::PSDf(), and noiseFFT::RMSmeanPf().

Here is the caller graph for this function:

◆ apply() [2/2]

Foam::tmp<Foam::Field<Type> > apply ( const Field< Type > &  fld,
const label  windowI 
) const

Definition at line 34 of file windowModelTemplates.C.

References Foam::abort(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, fld, Foam::New(), Foam::nl, nSamples(), and Foam::Zero.

Here is the call graph for this function:

Member Data Documentation

◆ nOverlapSamples_

label nOverlapSamples_
protected

Number of overlap samples per window.

Definition at line 62 of file windowModel.H.

Referenced by windowModel::windowModel().

◆ nWindow_

label nWindow_
protected

Number of windows.

Definition at line 65 of file windowModel.H.


The documentation for this class was generated from the following files: