|
PSCF v1.5.0
|
Trajectory file reader (abstract base class). More...
#include <TrajectoryReader.h>
Public Member Functions | |
| TrajectoryReader (System< D, T > &system) | |
| Constructor. | |
| virtual | ~TrajectoryReader ()=default |
| Destructor. | |
| virtual void | open (std::string filename)=0 |
| Open trajectory file and allocate memory if necessary. | |
| virtual void | readHeader () |
| Read header of trajectory file (if any). | |
| virtual bool | readFrame ()=0 |
| Read a single frame. | |
| virtual void | close ()=0 |
| Close the trajectory file. | |
Protected Member Functions | |
| System< D, T > & | system () |
| Return reference to parent system. | |
Trajectory file reader (abstract base class).
Template parameters:
Definition at line 36 of file TrajectoryReader.h.
|
inline |
Constructor.
| system | parent System object |
Definition at line 46 of file TrajectoryReader.h.
References system().
Referenced by Pscf::Rp::RGridTrajectoryReader< D, T >::RGridTrajectoryReader(), and Pscf::Rp::RGridTrajectoryReader< D, T >::~RGridTrajectoryReader().
|
virtualdefault |
Destructor.
|
pure virtual |
Open trajectory file and allocate memory if necessary.
By convention, this function treats the trajectory filename as the name of an input file, and opens the file using the FileMaster:openInutFile function. This function prepends the input prefix (if any) to the file path.
| filename | trajectory input file name. |
Implemented in Pscf::Rp::RGridTrajectoryReader< D, T >.
Referenced by Pscf::Rp::BdSimulator< D, T >::analyze(), and Pscf::Rp::McSimulator< D, T >::analyze().
|
inlinevirtual |
Read header of trajectory file (if any).
Empty default implementation.
Reimplemented in Pscf::Rp::RGridTrajectoryReader< D, T >.
Definition at line 72 of file TrajectoryReader.h.
Referenced by Pscf::Rp::BdSimulator< D, T >::analyze(), and Pscf::Rp::McSimulator< D, T >::analyze().
|
pure virtual |
Read a single frame.
This function reads a frame from the trajectory file that was opened by the open() function.
Implemented in Pscf::Rp::RGridTrajectoryReader< D, T >.
|
pure virtual |
Close the trajectory file.
Implemented in Pscf::Rp::RGridTrajectoryReader< D, T >.
Referenced by Pscf::Rp::BdSimulator< D, T >::analyze(), and Pscf::Rp::McSimulator< D, T >::analyze().
|
inlineprotected |
Return reference to parent system.
Definition at line 95 of file TrajectoryReader.h.
Referenced by Pscf::Rp::RGridTrajectoryReader< D, T >::open(), Pscf::Rp::RGridTrajectoryReader< D, T >::readFrame(), Pscf::Rp::RGridTrajectoryReader< D, T >::readHeader(), Pscf::Rp::RGridTrajectoryReader< D, T >::RGridTrajectoryReader(), TrajectoryReader(), and Pscf::Rp::RGridTrajectoryReader< D, T >::~RGridTrajectoryReader().