5#include <util/misc/FileMaster.h>
15 template <
int D,
class SimT,
class SysT>
21 template <
int D,
class SimT,
class SysT>
30 template <
int D,
class SimT,
class SysT>
37 fileMasterPtr_(nullptr)
43 template <
int D,
class SimT,
class SysT>
53 template <
int D,
class SimT,
class SysT>
60 if (baseInterval < 0) {
75 if (interval_ % baseInterval != 0) {
76 UTIL_THROW(
"interval is not a multiple of baseInterval");
80 template <
int D,
class SimT,
class SysT>
90 template <
int D,
class SimT,
class SysT>
97 template <
int D,
class SimT,
class SysT>
101 return (*fileMasterPtr_);
107 template <
int D,
class SimT,
class SysT>
111 std::string filename = outputFileName_;
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.
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.
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.
ScalarParam< Type > & read(std::istream &in, const char *label, Type &value)
Add and read a new required ScalarParam < Type > object.
ScalarParam< Type > & readOptional(std::istream &in, const char *label, Type &value)
Add and read a new optional ScalarParam < Type > object.
ParamComposite()
Constructor.
File containing preprocessor macros for error handling.
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
#define UTIL_THROW(msg)
Macro for throwing an Exception, reporting function, file and line number.
Class templates for real-valued periodic fields.
PSCF package top-level namespace.