4#include <util/param/ParamComposite.h>
6#include <pscf/backend/TmplDeclare.h>
16 template <
int D,
class T>
class System;
17 template <
int D,
class T>
class Simulator;
47 template <
int D,
class T>
193 std::string outputFileName_;
211 template <
int D,
class T>
inline
213 {
return interval_; }
218 template <
int D,
class T>
inline
220 {
return (counter%interval_ == 0); }
225 template <
int D,
class T>
inline
227 {
return outputFileName_; }
232 template <
int D,
class T>
inline
236 return *simulatorPtr_;
242 template <
int D,
class T>
inline
Abstract base for periodic output and/or analysis actions.
static void initStatic()
Define and initialize baseInterval (initialized to 1).
Analyzer(Simulator< D, T > &simulator, System< D, T > &system)
Constructor.
void readInterval(std::istream &in)
Optionally read interval from file, with error checking.
bool isAtInterval(long counter) const
Return true iff counter is a multiple of the interval.
static long baseInterval
The interval for every Analyzer must be a multiple of baseInterval.
void setFileMaster(FileMaster &fileMaster)
Set the FileMaster to use to open files.
Simulator< D, T > & simulator()
Get the parent Simulator by reference.
virtual void setup()
Complete any required initialization.
std::string const & outputFileName() const
Get the outputFileName string.
~Analyzer()=default
Destructor.
virtual void readParameters(std::istream &in)
Read parameters from archive.
FileMaster & fileMaster()
Get the FileMaster by reference.
virtual void output()
Output any results at the end of the simulation.
int interval() const
Get the interval value.
System< D, T > & system()
Get the parent System by reference.
void readOutputFileName(std::istream &in)
Read outputFileName from file.
virtual void sample(long iStep)=0
Calculate, analyze and/or output a physical quantity.
Simulator< D, T > & simulator()
Get the parent Simulator by reference.
System< D, T > & system()
Get the parent System by reference.
Base class for field theoretic PS-FTS simulator.
Base class template for classes that represent a complete system.
A FileMaster manages input and output files for a simulation.
ParamComposite()
Constructor.
#define UTIL_ASSERT(condition)
Assertion macro suitable for debugging serial or parallel code.
Code for programs that simulate real-valued periodic fields.
PSCF package top-level namespace.
Utility classes for scientific computation.