Public Types | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | Friends
bufferedAccumulator Class Reference
Collaboration diagram for bufferedAccumulator:
Collaboration graph
[legend]

Public Types

typedef pTraits< Type >::cmptType cmptType
 Component type. More...
 

Public Member Functions

 bufferedAccumulator ()
 Construct null. More...
 
 bufferedAccumulator (const label nBuffers, const label bufferLength, const label bufferingInterval)
 Construct from components. More...
 
 bufferedAccumulator (const bufferedAccumulator< Type > &)
 Construct as copy. More...
 
 ~bufferedAccumulator ()
 Destructor. More...
 
label addToBuffers (const List< Type > &valuesToAdd)
 
Field< Type > averaged () const
 
void resetAveraging ()
 
label averagesTaken () const
 
label nBuffers () const
 
label bufferLength () const
 
const List< label > & bufferOffsets () const
 
void setSizes (const label nBuffers, const label bufferLength, const label bufferingInterval)
 
void operator= (const bufferedAccumulator< Type > &)
 

Static Public Attributes

static const char *const typeName
 

Private Member Functions

Field< Type > & accumulationBuffer ()
 
const Field< Type > & accumulationBuffer () const
 
void accumulateAndResetBuffer (const label b)
 

Private Attributes

label averagesTaken_
 
List< labelbufferOffsets_
 

Friends

Ostreamoperator (Ostream &, const bufferedAccumulator< Type > &)
 

Detailed Description

Source files

Definition at line 46 of file bufferedAccumulator.H.

Member Typedef Documentation

◆ cmptType

typedef pTraits<Type>::cmptType cmptType

Component type.

Definition at line 83 of file bufferedAccumulator.H.

Constructor & Destructor Documentation

◆ bufferedAccumulator() [1/3]

Construct null.

Definition at line 53 of file bufferedAccumulator.C.

◆ bufferedAccumulator() [2/3]

bufferedAccumulator ( const label  nBuffers,
const label  bufferLength,
const label  bufferingInterval 
)

Construct from components.

Definition at line 63 of file bufferedAccumulator.C.

◆ bufferedAccumulator() [3/3]

Construct as copy.

◆ ~bufferedAccumulator()

Destructor.

Definition at line 97 of file bufferedAccumulator.C.

Member Function Documentation

◆ accumulationBuffer() [1/2]

Field< Type > & accumulationBuffer ( )
inlineprivate

Definition at line 32 of file bufferedAccumulatorI.H.

◆ accumulationBuffer() [2/2]

const Field< Type > & accumulationBuffer ( ) const
inlineprivate

Definition at line 39 of file bufferedAccumulatorI.H.

◆ accumulateAndResetBuffer()

void accumulateAndResetBuffer ( const label  b)
private

Definition at line 38 of file bufferedAccumulator.C.

References Foam::constant::physicoChemical::b.

◆ addToBuffers()

Foam::label addToBuffers ( const List< Type > &  valuesToAdd)

Definition at line 131 of file bufferedAccumulator.C.

References Foam::abort(), Foam::constant::physicoChemical::b, Foam::FatalError, and FatalErrorInFunction.

Here is the call graph for this function:

◆ averaged()

Foam::Field< Type > averaged ( ) const

Definition at line 174 of file bufferedAccumulator.C.

References Foam::endl(), and WarningInFunction.

Here is the call graph for this function:

◆ resetAveraging()

void resetAveraging ( )

Definition at line 196 of file bufferedAccumulator.C.

◆ averagesTaken()

label averagesTaken ( ) const
inline

Definition at line 48 of file bufferedAccumulatorI.H.

◆ nBuffers()

label nBuffers ( ) const
inline

Definition at line 55 of file bufferedAccumulatorI.H.

◆ bufferLength()

label bufferLength ( ) const
inline

Definition at line 62 of file bufferedAccumulatorI.H.

◆ bufferOffsets()

const List< label > & bufferOffsets ( ) const
inline

Definition at line 69 of file bufferedAccumulatorI.H.

◆ setSizes()

void setSizes ( const label  nBuffers,
const label  bufferLength,
const label  bufferingInterval 
)

Definition at line 105 of file bufferedAccumulator.C.

References Foam::constant::physicoChemical::b, and forAll.

◆ operator=()

void operator= ( const bufferedAccumulator< Type > &  rhs)

Definition at line 208 of file bufferedAccumulator.C.

References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator

Ostream& operator ( Ostream ,
const bufferedAccumulator< Type > &   
)
friend

Field Documentation

◆ averagesTaken_

label averagesTaken_
private

Definition at line 66 of file bufferedAccumulator.H.

◆ bufferOffsets_

List<label> bufferOffsets_
private

Definition at line 68 of file bufferedAccumulator.H.

◆ typeName

const char *const typeName
static

Definition at line 88 of file bufferedAccumulator.H.


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