PSCF v1.4.0
Pscf::Rpc::AverageListAnalyzer< D > Class Template Reference

Analyze averages and block averages of several real variables. More...

#include <AverageListAnalyzer.h>

Inheritance diagram for Pscf::Rpc::AverageListAnalyzer< D >:
Pscf::Rp::AverageListAnalyzer< D, Types< D > >

Public Member Functions

 AverageListAnalyzer (Simulator< D > &simulator, System< D > &system)
 Constructor.
Public Member Functions inherited from Pscf::Rp::AverageListAnalyzer< D, Types< D > >
 AverageListAnalyzer (typename Types< D >::Simulator &simulator, typename Types< D >::System &system)
 Constructor.
void readParameters (std::istream &in) override
 Read interval, outputFileName and (optionally) nSamplePerOutput.
void setup () override
 Setup before loop.
void sample (long iStep) override
 Compute sampled values and update the accumulators.
void output () override
 Write final results to file after a simulation.
int nSamplePerOutput () const
 Get value of nSamplePerOutput.
int nValue () const
 Get the number of variables.
const std::string & name (int i) const
 Get name associated with a variable.
const Averageaccumulator (int i) const
 Get Average accumulator for a specific variable.

Additional Inherited Members

Protected Member Functions inherited from Pscf::Rp::AverageListAnalyzer< D, Types< D > >
void initializeAccumulators (int nValue)
 Initialize Average accumulators and set nValue.
void clearAccumulators ()
 Clear internal state of all accumulators.
void setName (int i, std::string name)
 Set name of variable.
void setValue (int i, double value)
 Set current value, used by compute function.
virtual void compute ()=0
 Compute values of sampled quantities.
double value (int i) const
 Get current value of a specific variable.
void updateAccumulators (long iStep)
 Add current value to accumulator, output block average if needed.
void outputAccumulators ()
 Write results of statistical analysis to files.
Protected Attributes inherited from Pscf::Rp::AverageListAnalyzer< D, Types< D > >
std::ofstream outputFile_
 Output file stream.

Detailed Description

template<int D>
class Pscf::Rpc::AverageListAnalyzer< D >

Analyze averages and block averages of several real variables.

This class evaluates averages of several sampled real variables, and optionally writes block averages to a data file during a simulation. It is intended for use as a base class for Analyzers that evaluate averages and (optionally) block averages for several physical variables.

Specializations of this template with D=1, 2, and 3 are derived from specializations of the base class template Rp::AverageListAnalyzer, and inherit their public interface and almost all of their source code from this base class.

See also
Rp::AverageListAnalyzer

Definition at line 41 of file /fts/analyzer/AverageListAnalyzer.h.

Constructor & Destructor Documentation

◆ AverageListAnalyzer()

template<int D>
Pscf::Rpc::AverageListAnalyzer< D >::AverageListAnalyzer ( Simulator< D > & simulator,
System< D > & system )

Constructor.

Parameters
simulatorparent Simulator object
systemparent System object

Definition at line 17 of file AverageListAnalyzer.cpp.

References AverageListAnalyzer().

Referenced by AverageListAnalyzer().


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