|
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::Rpg::TrajectoryReader< D > | |
| TrajectoryReader (System< D > &system) | |
| Constructor. | |
| virtual | ~TrajectoryReader () |
| Destructor. | |
Protected Member Functions | |
| void | allocate () |
| Allocate memory required by trajectory reader. | |
| System< D > & | system () |
| Return reference to parent system. | |
| Protected Member Functions inherited from Pscf::Rpg::TrajectoryReader< D > | |
| System< D > & | system () |
| Return reference to parent system. | |
Trajectory file reader.
Definition at line 31 of file rpg/fts/trajectory/RGridTrajectoryReader.h.
| Pscf::Rpg::RGridTrajectoryReader< D >::RGridTrajectoryReader | ( | System< D > & | system | ) |
Constructor.
| system | parent System<D> object |
Definition at line 32 of file rpg/fts/trajectory/RGridTrajectoryReader.tpp.
References system(), and Pscf::Rpg::TrajectoryReader< D >::TrajectoryReader().
|
inlinevirtual |
Destructor.
Definition at line 46 of file rpg/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. If compiled with MPI enabled, so that each processor simulates a different system, it also prepends a processor id prefix before the input prefix.
| filename | trajectory input file name. |
Implements Pscf::Rpg::TrajectoryReader< D >.
Definition at line 57 of file rpg/fts/trajectory/RGridTrajectoryReader.tpp.
References allocate(), and 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::Rpg::TrajectoryReader< D >.
Definition at line 81 of file rpg/fts/trajectory/RGridTrajectoryReader.tpp.
References Util::checkString(), Util::Log::file(), Util::getNextLine(), Pscf::Rpg::FieldIo< D >::readFieldsRGridData(), system(), UTIL_CHECK, and UTIL_THROW.
|
virtual |
Close the trajectory file.
Implements Pscf::Rpg::TrajectoryReader< D >.
Definition at line 130 of file rpg/fts/trajectory/RGridTrajectoryReader.tpp.
|
virtual |
Read header of trajectory file.
Reimplemented from Pscf::Rpg::TrajectoryReader< D >.
Definition at line 64 of file rpg/fts/trajectory/RGridTrajectoryReader.tpp.
References Util::Log::file(), Pscf::Prdc::hasSymmetry(), Pscf::Rpg::FieldIo< D >::readFieldHeader(), and system().
|
protected |
Allocate memory required by trajectory reader.
Definition at line 39 of file rpg/fts/trajectory/RGridTrajectoryReader.tpp.
References system(), and UTIL_CHECK.
Referenced by open().
|
inlineprotected |
Return reference to parent system.
Definition at line 116 of file rpg/fts/trajectory/RGridTrajectoryReader.h.
Referenced by allocate(), open(), readFrame(), readHeader(), and RGridTrajectoryReader().