1#ifndef RP_AVERAGE_ANALYZER_H
2#define RP_AVERAGE_ANALYZER_H
11#include <rp/fts/analyzer/Analyzer.h>
12#include <util/accumulators/Average.h>
14#include <pscf/backend/TmplDeclare.h>
37 template <
int D,
class T>
69 virtual void sample(
long iStep);
133 int nSamplePerOutput_;
142 template <
int D,
class T>
inline
144 {
return nSamplePerOutput_; }
Analyzer(Simulator< D, T > &simulator, System< D, T > &system)
Constructor.
Simulator< D, T > & simulator()
Get the parent Simulator by reference.
System< D, T > & system()
Get the parent System by reference.
Analyze averages and block averages of a single real variable.
int nSamplePerOutput() const
Get value of nSamplePerOutput.
~AverageAnalyzer()=default
Destructor.
virtual void outputValue(int step, double value)
Output a sampled or block average value.
virtual void sample(long iStep)
Compute a sampled value and update the accumulator.
virtual void readParameters(std::istream &in)
Read interval, outputFileName and (optionally) nSamplePerOutput.
Average accumulator_
Average object.
AverageAnalyzer(Simulator< D, T > &simulator, System< D, T > &system)
Constructor.
virtual void output()
Write final results to file after a simulation.
std::ofstream outputFile_
Output file stream.
virtual void setup()
Setup before loop.
virtual double compute()=0
Compute value of sampled quantity.
Base class for field theoretic PS-FTS simulator.
Base class template for classes that represent a complete system.
Calculates the average and variance of a sampled property.
Code for programs that simulate real-valued periodic fields.
PSCF package top-level namespace.