ls1-MarDyn
ls1-MarDyn molecular dynamics code
BinaryReader.h
1/*
2 * BinaryReader.h
3 *
4 * Created on: Apr 11, 2014
5 * Author: andal
6 */
7#ifndef BINARYREADER_H_
8#define BINARYREADER_H_
9
10#include <string>
11#include <fstream>
12
13#include "utils/xmlfile.h"
14#include "io/InputBase.h"
15
16class BinaryReader : public InputBase {
17
18public:
19
21
23
24 void readXML(XMLfileUnits& xmlconfig);
25
33 void setPhaseSpaceFile(std::string filename);
34
37
72 void readPhaseSpaceHeader(Domain* domain, double timestep);
73
89 unsigned long readPhaseSpace(ParticleContainer* particleContainer, Domain* domain, DomainDecompBase* domainDecomp);
90
91private:
92
93 uint32_t _nMoleculeFormat;
94 std::string _moleculeFormat;
95 std::string _phaseSpaceFile;
96 std::string _phaseSpaceHeaderFile;
97 std::ifstream _phaseSpaceFileStream;
98 std::fstream _phaseSpaceHeaderFileStream;
99
100};
101
102#endif /* BINARYREADER_H_ */
Definition: BinaryReader.h:16
void setPhaseSpaceHeaderFile(std::string filename)
For this class, header and data are in the same file, so there is no separate header file.
Definition: BinaryReader.cpp:72
unsigned long readPhaseSpace(ParticleContainer *particleContainer, Domain *domain, DomainDecompBase *domainDecomp)
reads in the data of all molecules
Definition: BinaryReader.cpp:123
void setPhaseSpaceFile(std::string filename)
gets a filename and opens an ifstream associated with the given file
Definition: BinaryReader.cpp:68
void readPhaseSpaceHeader(Domain *domain, double timestep)
reads in header of the input file (including component description)
Definition: BinaryReader.cpp:76
handle boundary region and multiple processes
Definition: DomainDecompBase.h:51
This class is used to read in the phasespace and to handle macroscopic values.
Definition: Domain.h:47
interface for any kind of input class
Definition: InputBase.h:18
This Interface is used to get access to particles and pairs of particles.
Definition: ParticleContainer.h:69
XML file with unit attributes abstraction.
Definition: xmlfileUnits.h:25
::xsd::cxx::tree::string< char, simple_type > string
C++ type corresponding to the string XML Schema built-in type.
Definition: vtk-punstructured.h:270
XML input file.