4#include <util/param/ParamComposite.h>
44 template <
int D,
class SimT,
class SysT>
192 std::string outputFileName_;
210 template <
int D,
class SimT,
class SysT>
inline
212 {
return interval_; }
217 template <
int D,
class SimT,
class SysT>
inline
219 {
return (counter%interval_ == 0); }
224 template <
int D,
class SimT,
class SysT>
inline
226 {
return outputFileName_; }
231 template <
int D,
class SimT,
class SysT>
inline
235 return *simulatorPtr_;
241 template <
int D,
class SimT,
class SysT>
inline
int interval() const
Get the interval value.
void readInterval(std::istream &in)
Optionally read interval from file, with error checking.
FileMaster & fileMaster()
Get the FileMaster by reference.
virtual void readParameters(std::istream &in)
Read parameters from archive.
void readOutputFileName(std::istream &in)
Read outputFileName from file.
SimT & simulator()
Get the parent Simulator by reference.
virtual void setup()
Complete any required initialization.
bool isAtInterval(long counter) const
Return true iff counter is a multiple of the interval.
~Analyzer()=default
Destructor.
virtual void sample(long iStep)=0
Calculate, analyze and/or output a physical quantity.
Analyzer(SimT &simulator, SysT &system)
Constructor.
std::string const & outputFileName() const
Get the outputFileName string.
void setFileMaster(FileMaster &fileMaster)
Set the FileMaster to use to open files.
virtual void output()
Output any results at the end of the simulation.
SysT & system()
Get the parent System by reference.
static long baseInterval
The interval for every Analyzer must be a multiple of baseInterval.
static void initStatic()
Define and initialize baseInterval (initialized to 1).
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.
Class templates for real-valued periodic fields.
PSCF package top-level namespace.
Utility classes for scientific computation.