Public Types | Public Member Functions | Static Public Attributes | Private Attributes | Static Private Attributes | Friends
fieldAverageItem Class Reference

Helper class to describe what form of averaging to apply. A set will be applied to each base field in Foam::fieldAverage, of the form: More...

Collaboration diagram for fieldAverageItem:
Collaboration graph
[legend]

Public Types

enum  baseType { ITER, TIME }
 Enumeration defining the averaging base type. More...
 

Public Member Functions

 fieldAverageItem ()
 Construct null. More...
 
 fieldAverageItem (Istream &)
 Construct from Istream. More...
 
 fieldAverageItem (const fieldAverageItem &)
 Construct as copy. More...
 
 ~fieldAverageItem ()
 Destructor. More...
 
const Switchactive () const
 Return const access to the active flag. More...
 
Switchactive ()
 Return non-const access to the active flag. More...
 
const wordfieldName () const
 Return const access to the field name. More...
 
const Switchmean () const
 Return const access to the mean flag. More...
 
Switchmean ()
 Return non-const access to the mean flag. More...
 
const wordmeanFieldName () const
 Return const access to the mean field name. More...
 
const Switchprime2Mean () const
 Return const access to the prime-squared mean flag. More...
 
Switchprime2Mean ()
 Return non-const access to the prime-squared mean flag. More...
 
const wordprime2MeanFieldName () const
 Return const access to the prime-squared mean field name. More...
 
const word base () const
 Return averaging base type name. More...
 
Switch iterBase () const
 Return true if base is ITER. More...
 
Switch timeBase () const
 Return true if base is time. More...
 
scalar window () const
 
const wordwindowName () const
 
void operator= (const fieldAverageItem &)
 

Static Public Attributes

static const word EXT_MEAN = "Mean"
 Mean average. More...
 
static const word EXT_PRIME2MEAN = "Prime2Mean"
 Prime-squared average. More...
 

Private Attributes

Switch active_
 Active flag. More...
 
word fieldName_
 Field name. More...
 
Switch mean_
 Compute mean flag. More...
 
word meanFieldName_
 Name of mean field. More...
 
Switch prime2Mean_
 Compute prime-squared mean flag. More...
 
word prime2MeanFieldName_
 Name of prime-squared mean field. More...
 
baseType base_
 Averaging base type. More...
 
scalar window_
 Averaging window - defaults to -1 for 'all iters/time'. More...
 
word windowName_
 Averaging window name - defaults to 'window'. More...
 

Static Private Attributes

static const NamedEnum< baseType, 2 > baseTypeNames_
 Averaging base type names. More...
 

Friends

bool operator== (const fieldAverageItem &a, const fieldAverageItem &b)
 
bool operator!= (const fieldAverageItem &a, const fieldAverageItem &b)
 
Istreamoperator>> (Istream &, fieldAverageItem &)
 
Ostreamoperator<< (Ostream &, const fieldAverageItem &)
 

Detailed Description

Helper class to describe what form of averaging to apply. A set will be applied to each base field in Foam::fieldAverage, of the form:

{
    mean            on;
    prime2Mean      on;
    base            time; // iteration
    window          200;  // optional averaging window
    windowName      w1;   // optional window name (default = "")
}

The averaging window corresponds to the averaging interval (iters or time) If not specified, the averaging is over 'all iters/time'

Source files

Definition at line 74 of file fieldAverageItem.H.

Member Enumeration Documentation

◆ baseType

enum baseType

Enumeration defining the averaging base type.

Enumerator
ITER 
TIME 

Definition at line 89 of file fieldAverageItem.H.

Constructor & Destructor Documentation

◆ fieldAverageItem() [1/3]

Construct null.

Definition at line 54 of file fieldAverageItem.C.

◆ fieldAverageItem() [2/3]

◆ fieldAverageItem() [3/3]

fieldAverageItem ( const fieldAverageItem faItem)

Construct as copy.

Definition at line 68 of file fieldAverageItem.C.

◆ ~fieldAverageItem()

Destructor.

Definition at line 84 of file fieldAverageItem.C.

Member Function Documentation

◆ active() [1/2]

const Switch& active ( ) const
inline

Return const access to the active flag.

Definition at line 154 of file fieldAverageItem.H.

References fieldAverageItem::active_.

◆ active() [2/2]

Switch& active ( )
inline

Return non-const access to the active flag.

Definition at line 160 of file fieldAverageItem.H.

References fieldAverageItem::active_.

◆ fieldName()

const word& fieldName ( ) const
inline

Return const access to the field name.

Definition at line 166 of file fieldAverageItem.H.

References fieldAverageItem::fieldName_.

◆ mean() [1/2]

const Switch& mean ( ) const
inline

Return const access to the mean flag.

Definition at line 172 of file fieldAverageItem.H.

References fieldAverageItem::mean_.

◆ mean() [2/2]

Switch& mean ( )
inline

Return non-const access to the mean flag.

Definition at line 178 of file fieldAverageItem.H.

References fieldAverageItem::mean_.

◆ meanFieldName()

const word& meanFieldName ( ) const
inline

Return const access to the mean field name.

Definition at line 184 of file fieldAverageItem.H.

References fieldAverageItem::meanFieldName_.

◆ prime2Mean() [1/2]

const Switch& prime2Mean ( ) const
inline

Return const access to the prime-squared mean flag.

Definition at line 190 of file fieldAverageItem.H.

References fieldAverageItem::prime2Mean_.

◆ prime2Mean() [2/2]

Switch& prime2Mean ( )
inline

Return non-const access to the prime-squared mean flag.

Definition at line 196 of file fieldAverageItem.H.

References fieldAverageItem::prime2Mean_.

◆ prime2MeanFieldName()

const word& prime2MeanFieldName ( ) const
inline

Return const access to the prime-squared mean field name.

Definition at line 202 of file fieldAverageItem.H.

References fieldAverageItem::prime2MeanFieldName_.

◆ base()

const word base ( ) const
inline

Return averaging base type name.

Definition at line 208 of file fieldAverageItem.H.

References fieldAverageItem::base_, and fieldAverageItem::baseTypeNames_.

◆ iterBase()

Switch iterBase ( ) const
inline

Return true if base is ITER.

Definition at line 214 of file fieldAverageItem.H.

References fieldAverageItem::base_, and fieldAverageItem::ITER.

◆ timeBase()

Switch timeBase ( ) const
inline

Return true if base is time.

Definition at line 220 of file fieldAverageItem.H.

References fieldAverageItem::base_, and fieldAverageItem::TIME.

◆ window()

scalar window ( ) const
inline

Definition at line 225 of file fieldAverageItem.H.

References fieldAverageItem::window_.

◆ windowName()

const word& windowName ( ) const
inline

Definition at line 230 of file fieldAverageItem.H.

References fieldAverageItem::windowName_.

◆ operator=()

void operator= ( const fieldAverageItem rhs)

Friends And Related Function Documentation

◆ operator==

bool operator== ( const fieldAverageItem a,
const fieldAverageItem b 
)
friend

Definition at line 244 of file fieldAverageItem.H.

◆ operator!=

bool operator!= ( const fieldAverageItem a,
const fieldAverageItem b 
)
friend

Definition at line 261 of file fieldAverageItem.H.

◆ operator>>

Istream& operator>> ( Istream ,
fieldAverageItem  
)
friend

◆ operator<<

Ostream& operator<< ( Ostream ,
const fieldAverageItem  
)
friend

Field Documentation

◆ EXT_MEAN

const word EXT_MEAN = "Mean"
static

Mean average.

Definition at line 83 of file fieldAverageItem.H.

Referenced by fieldAverageItem::fieldAverageItem(), and Foam::operator>>().

◆ EXT_PRIME2MEAN

const word EXT_PRIME2MEAN = "Prime2Mean"
static

Prime-squared average.

Definition at line 86 of file fieldAverageItem.H.

Referenced by fieldAverageItem::fieldAverageItem(), and Foam::operator>>().

◆ active_

Switch active_
private

Active flag.

Definition at line 101 of file fieldAverageItem.H.

Referenced by fieldAverageItem::active(), fieldAverageItem::operator=(), and Foam::operator>>().

◆ fieldName_

word fieldName_
private

◆ mean_

Switch mean_
private

◆ meanFieldName_

word meanFieldName_
private

◆ prime2Mean_

Switch prime2Mean_
private

Compute prime-squared mean flag.

Definition at line 113 of file fieldAverageItem.H.

Referenced by fieldAverageItem::fieldAverageItem(), fieldAverageItem::operator=(), Foam::operator>>(), and fieldAverageItem::prime2Mean().

◆ prime2MeanFieldName_

word prime2MeanFieldName_
private

◆ baseTypeNames_

const Foam::NamedEnum< Foam::fieldAverageItem::baseType, 2 > baseTypeNames_
staticprivate

Averaging base type names.

Definition at line 119 of file fieldAverageItem.H.

Referenced by fieldAverageItem::base(), fieldAverageItem::fieldAverageItem(), Foam::operator<<(), and Foam::operator>>().

◆ base_

baseType base_
private

◆ window_

scalar window_
private

Averaging window - defaults to -1 for 'all iters/time'.

Definition at line 125 of file fieldAverageItem.H.

Referenced by fieldAverageItem::fieldAverageItem(), Foam::operator<<(), fieldAverageItem::operator=(), Foam::operator>>(), and fieldAverageItem::window().

◆ windowName_

word windowName_
private

Averaging window name - defaults to 'window'.

Definition at line 128 of file fieldAverageItem.H.

Referenced by fieldAverageItem::fieldAverageItem(), Foam::operator<<(), fieldAverageItem::operator=(), Foam::operator>>(), and fieldAverageItem::windowName().


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