1#ifndef RPG_TRAJECTORY_WRITER_H
2#define RPG_TRAJECTORY_WRITER_H
13#include <rpg/system/System.h>
19 template <
int D>
class System;
76 template <
class Archive>
77 void serialize(Archive& ar,
const unsigned int version);
90 virtual void sample(
long iStep);
105 std::ofstream outputFile_;
108 std::string filename_;
143 void writeFrame(std::ofstream& out,
long iStep);
162 template <
class Archive>
Abstract base for periodic output and/or analysis actions.
const std::string & outputFileName() const
Return outputFileName string.
Analyzer()
Default constructor.
bool isAtInterval(long counter) const
Return true iff counter is a multiple of the interval.
Field theoretic simulator (base class).
Main class, representing one complete system.
void writeHeader(std::ofstream &out)
Write data that should appear once, at beginning of the file.
virtual void save(Serializable::OArchive &ar)
Save state to archive.
virtual void readParameters(std::istream &in)
Read interval and output file name.
virtual void setup()
Clear nSample counter.
long nSample_
Number of configurations dumped thus far (first dump is zero).
Simulator< D > & simulator()
Return reference to parent Simulator.
TrajectoryWriter(Simulator< D > &simulator, System< D > &system)
Constructor.
void writeFrame(std::ofstream &out, long iStep)
Write data that should appear in every frame.
virtual ~TrajectoryWriter()
Destructor.
Simulator< D > * simulatorPtr_
Pointer to parent Simulator.
System< D > & system()
Return reference to parent system.
virtual void output()
Close trajectory file after run.
long isInitialized_
Has readParam been called?
System< D > * systemPtr_
Pointer to the parent system.
virtual void sample(long iStep)
Write a frame/snapshot to trajectory file.
void serialize(Archive &ar, const unsigned int version)
Serialize this ParamComponent as a string.
ScalarParam< Type > & read(std::istream &in, const char *label, Type &value)
Add and read a new required ScalarParam < Type > object.
void setClassName(const char *className)
Set class name string.
virtual void loadParameters(Serializable::IArchive &ar)
Load state from archive, without adding Begin and End lines.
BinaryFileIArchive IArchive
Type of input archive used by load method.
BinaryFileOArchive OArchive
Type of output archive used by save method.
File containing preprocessor macros for error handling.
Fields, FFTs, and utilities for periodic boundary conditions (CUDA)
Periodic fields and crystallography.
SCFT and PS-FTS with real periodic fields (GPU)
PSCF package top-level namespace.