PSCF v1.2
Pscf::Rpc::TrajectoryReader< D > Class Template Referenceabstract

Trajectory file reader (base class). More...

#include <TrajectoryReader.h>

Inheritance diagram for Pscf::Rpc::TrajectoryReader< D >:
Pscf::Rpc::RGridTrajectoryReader< D >

Public Member Functions

 TrajectoryReader (System< D > &system)
 Constructor.
 
virtual ~TrajectoryReader ()
 Destructor.
 
virtual void open (std::string filename)=0
 Open trajectory file and read header, if any.
 
virtual bool readFrame ()=0
 Read a single frame.
 
virtual void close ()=0
 Close the trajectory file.
 

Protected Member Functions

System< D > & system ()
 Return reference to parent system.
 

Detailed Description

template<int D>
class Pscf::Rpc::TrajectoryReader< D >

Trajectory file reader (base class).

Definition at line 24 of file rpc/fts/trajectory/TrajectoryReader.h.

Constructor & Destructor Documentation

◆ TrajectoryReader()

template<int D>
Pscf::Rpc::TrajectoryReader< D >::TrajectoryReader ( System< D > & system)

Constructor.

Definition at line 20 of file rpc/fts/trajectory/TrajectoryReader.tpp.

◆ ~TrajectoryReader()

template<int D>
virtual Pscf::Rpc::TrajectoryReader< D >::~TrajectoryReader ( )
inlinevirtual

Destructor.

Definition at line 37 of file rpc/fts/trajectory/TrajectoryReader.h.

Member Function Documentation

◆ open()

template<int D>
virtual void Pscf::Rpc::TrajectoryReader< D >::open ( std::string filename)
pure virtual

Open trajectory file and read header, if any.

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. If compiled with MPI enabled, so that each processor simulates a different system, it also prepends a processor id prefix before the input prefix.

Parameters
filenametrajectory input file name.

Implemented in Pscf::Rpc::RGridTrajectoryReader< D >.

Referenced by Pscf::Rpc::BdSimulator< D >::analyze(), and Pscf::Rpc::McSimulator< D >::analyze().

◆ readFrame()

template<int D>
virtual bool Pscf::Rpc::TrajectoryReader< D >::readFrame ( )
pure virtual

Read a single frame.

Frames are assumed to be read consecutively.

This function reads a frame from the trajectory file that was opened by the open() function.

Returns
true if a frame is avaiable, false if at end of file

Implemented in Pscf::Rpc::RGridTrajectoryReader< D >.

Referenced by Pscf::Rpc::BdSimulator< D >::analyze(), and Pscf::Rpc::McSimulator< D >::analyze().

◆ close()

template<int D>
virtual void Pscf::Rpc::TrajectoryReader< D >::close ( )
pure virtual

◆ system()

template<int D>
System< D > & Pscf::Rpc::TrajectoryReader< D >::system ( )
inlineprotected

Return reference to parent system.

Definition at line 88 of file rpc/fts/trajectory/TrajectoryReader.h.


The documentation for this class was generated from the following files: