PSCF v1.3.1
rpg/fts/trajectory/TrajectoryReader.h
1#ifndef RPG_TRAJECTORY_READER_H
2#define RPG_TRAJECTORY_READER_H
3
4/*
5* PSCF - Polymer Self-Consistent Field
6*
7* Copyright 2015 - 2025, The Regents of the University of Minnesota
8* Distributed under the terms of the GNU General Public License.
9*/
10
11#include <util/param/ParamComposite.h>
12#include <iostream>
13
14
15namespace Pscf {
16namespace Rpg {
17
18 template <int D> class System;
19 using namespace Util;
20
26 template <int D>
28 {
29
30 public:
31
36
40 virtual ~TrajectoryReader(){};
41
54 virtual void open(std::string filename) = 0;
55
64 virtual bool readFrame() = 0;
65
69 virtual void close() = 0;
70
71 virtual void readHeader(){};
72
73 protected:
74
79
80 private:
81
85 System<D>* systemPtr_;
86
87
88 };
89
90 // Get the parent system.
91 template <int D> inline
93 { return *systemPtr_; }
94
95 // Explicit instantiation declarations
96 extern template class TrajectoryReader<1>;
97 extern template class TrajectoryReader<2>;
98 extern template class TrajectoryReader<3>;
99
100}
101}
102#endif
Main class, representing a complete physical system.
virtual bool readFrame()=0
Read a single frame.
virtual void close()=0
Close the trajectory file.
virtual void open(std::string filename)=0
Open trajectory file and read header, if any.
TrajectoryReader(System< D > &system)
Constructor.
System< D > & system()
Return reference to parent system.
SCFT and PS-FTS with real periodic fields (GPU)
PSCF package top-level namespace.
Definition param_pc.dox:1