|
PSCF v1.3.3
|
Trajectory file reader. More...
#include <RGridTrajectoryReader.h>
Public Member Functions | |
| RGridTrajectoryReader (System< D > &system) | |
| Constructor. | |
| virtual | ~RGridTrajectoryReader () |
| Destructor. | |
| void | open (std::string filename) |
| Open trajectory file and read header, if any. | |
| bool | readFrame () |
| Read a single frame. | |
| void | close () |
| Close the trajectory file. | |
| void | readHeader () |
| Read header of trajectory file. | |
| Public Member Functions inherited from Pscf::Rpc::TrajectoryReader< D > | |
| TrajectoryReader (System< D > &system) | |
| Constructor. | |
| virtual | ~TrajectoryReader () |
| Destructor. | |
Protected Member Functions | |
| void | allocate () |
| Allocate memory required by trajectory reader. | |
| Protected Member Functions inherited from Pscf::Rpc::TrajectoryReader< D > | |
| System< D > & | system () |
| Return reference to parent system. | |
Trajectory file reader.
Definition at line 34 of file rpc/fts/trajectory/RGridTrajectoryReader.h.
| Pscf::Rpc::RGridTrajectoryReader< D >::RGridTrajectoryReader | ( | System< D > & | system | ) |
Constructor.
Definition at line 33 of file rpc/fts/trajectory/RGridTrajectoryReader.tpp.
References Pscf::Rpc::TrajectoryReader< D >::system(), and Pscf::Rpc::TrajectoryReader< D >::TrajectoryReader().
|
inlinevirtual |
Destructor.
Definition at line 47 of file rpc/fts/trajectory/RGridTrajectoryReader.h.
|
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.
| filename | trajectory input file name. |
Implements Pscf::Rpc::TrajectoryReader< D >.
Definition at line 58 of file rpc/fts/trajectory/RGridTrajectoryReader.tpp.
References allocate(), and Pscf::Rpc::TrajectoryReader< D >::system().
|
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.
Implements Pscf::Rpc::TrajectoryReader< D >.
Definition at line 82 of file rpc/fts/trajectory/RGridTrajectoryReader.tpp.
References Util::checkString(), Util::Log::file(), Util::getNextLine(), Pscf::Rpc::FieldIo< D >::readFieldsRGridData(), Pscf::Rpc::TrajectoryReader< D >::system(), UTIL_CHECK, and UTIL_THROW.
|
virtual |
Close the trajectory file.
Implements Pscf::Rpc::TrajectoryReader< D >.
Definition at line 133 of file rpc/fts/trajectory/RGridTrajectoryReader.tpp.
|
virtual |
Read header of trajectory file.
Reimplemented from Pscf::Rpc::TrajectoryReader< D >.
Definition at line 65 of file rpc/fts/trajectory/RGridTrajectoryReader.tpp.
References Util::Log::file(), Pscf::Prdc::hasSymmetry(), Pscf::Rpc::FieldIo< D >::readFieldHeader(), and Pscf::Rpc::TrajectoryReader< D >::system().
|
protected |
Allocate memory required by trajectory reader.
Definition at line 39 of file rpc/fts/trajectory/RGridTrajectoryReader.tpp.
References Pscf::Rpc::TrajectoryReader< D >::system(), and UTIL_CHECK.
Referenced by open().