PSCF v1.4.0
Pscf::Rp::RGridTrajectoryReader< D, T > Class Template Reference

Trajectory file reader. More...

#include <RGridTrajectoryReader.h>

Inheritance diagram for Pscf::Rp::RGridTrajectoryReader< D, T >:

Public Member Functions

void open (std::string filename) override
 Open trajectory file and read header, if any.
void readHeader () override
 Read header of trajectory file (if any).
bool readFrame () override
 Read a single frame from the trajectory file.
void close () override
 Close the trajectory file.

Protected Member Functions

 RGridTrajectoryReader (typename T::System &system)
 Constructor.
 ~RGridTrajectoryReader ()=default
 Destructor.

Detailed Description

template<int D, class T>
class Pscf::Rp::RGridTrajectoryReader< D, T >

Trajectory file reader.

Specializations of this class template are used as base classes for two closely analogous class templates, also named RGridTrajectorReader, that are defined in Rpc and Rpg namespaces for use in the pscf_rpc and pscf_rpg programs, respectively.

Template parameters:

Definition at line 38 of file fts/trajectory/RGridTrajectoryReader.h.

Constructor & Destructor Documentation

◆ RGridTrajectoryReader()

template<int D, class T>
Pscf::Rp::RGridTrajectoryReader< D, T >::RGridTrajectoryReader ( typename T::System & system)
protected

Constructor.

Parameters
systemparent System object

Definition at line 24 of file RGridTrajectoryReader.tpp.

◆ ~RGridTrajectoryReader()

template<int D, class T>
Pscf::Rp::RGridTrajectoryReader< D, T >::~RGridTrajectoryReader ( )
protecteddefault

Destructor.

Member Function Documentation

◆ open()

template<int D, class T>
void Pscf::Rp::RGridTrajectoryReader< D, T >::open ( std::string filename)
override

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.

Parameters
filenametrajectory input file name

Definition at line 52 of file RGridTrajectoryReader.tpp.

◆ readHeader()

template<int D, class T>
void Pscf::Rp::RGridTrajectoryReader< D, T >::readHeader ( )
override

Read header of trajectory file (if any).

Definition at line 62 of file RGridTrajectoryReader.tpp.

◆ readFrame()

template<int D, class T>
bool Pscf::Rp::RGridTrajectoryReader< D, T >::readFrame ( )
override

Read a single frame from the trajectory file.

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

Definition at line 78 of file RGridTrajectoryReader.tpp.

◆ close()

template<int D, class T>
void Pscf::Rp::RGridTrajectoryReader< D, T >::close ( )
override

Close the trajectory file.

Definition at line 129 of file RGridTrajectoryReader.tpp.


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