4#include <util/param/ParamComposite.h>
5#include <util/misc/FileMaster.h>
157 std::string outputFileName_;
171 {
return interval_; }
178 {
return (counter%interval_ == 0); }
185 {
return outputFileName_; }
193 template <
class Archive>
197 ar & outputFileName_;
201 #ifndef RPG_ANALYZER_TPP
203 extern template class Analyzer<1>;
204 extern template class Analyzer<2>;
205 extern template class Analyzer<3>;
Abstract base for periodic output and/or analysis actions.
virtual void readParameters(std::istream &in)
Read parameters from archive.
static long baseInterval
The interval for every Analyzer must be a multiple of baseInterval.
virtual void sample(long iStep)=0
Calculate, analyze and/or output a physical quantity.
virtual ~Analyzer()
Destructor.
const std::string & outputFileName() const
Return outputFileName string.
Analyzer()
Default constructor.
void setFileMaster(FileMaster &fileMaster)
Set the FileMaster to use to open files.
static void initStatic()
Define and initialize baseInterval.
FileMaster & fileMaster()
Get the FileMaster by reference.
void readOutputFileName(std::istream &in)
Read outputFileName from file.
virtual void setup()
Complete any required initialization.
virtual void output()
Output any results at the end of the simulation.
int interval() const
Get interval value.
void readInterval(std::istream &in)
Read interval from file, with error checking.
bool isAtInterval(long counter) const
Return true iff counter is a multiple of the interval.
A FileMaster manages input and output files for a simulation.
void serialize(Archive &ar, const unsigned int version)
Serialize this ParamComponent as a string.
An object that can read multiple parameters from file.
PSCF package top-level namespace.
Utility classes for scientific computation.