1#ifndef RPC_RGRID_TRAJECTORY_READER_TPP 
    2#define RPC_RGRID_TRAJECTORY_READER_TPP 
   11#include "RGridTrajectoryReader.h" 
   13#include <rpc/system/System.h> 
   14#include <rpc/solvers/Mixture.h> 
   15#include <rpc/field/Domain.h> 
   16#include <pscf/mesh/MeshIterator.h> 
   17#include <util/misc/ioUtil.h> 
   18#include <util/misc/FileMaster.h> 
   41      const int nMonomer = 
system().mixture().nMonomer();
 
   44      meshDimensions_ = 
system().domain().mesh().dimensions();
 
   46         wField_.allocate(nMonomer);
 
   47         for (
int i = 0; i < nMonomer; ++i) {
 
   48            wField_[i].allocate(meshDimensions_);
 
 
   60      system().fileMaster().open(filename, inputfile_);
 
 
   68      int nMonomer = 
system().mixture().nMonomer();
 
   74      system().setUnitCell(tmpUnitCell);
 
 
   90      std::stringstream line;
 
  105      step = std::stoi(value);
 
  119      int nMonomer = 
system().mixture().nMonomer();
 
  124      system().w().setRGrid(wField_);
 
 
  134   {  inputfile_.close();}
 
 
Base template for UnitCell<D> classes, D=1, 2 or 3.
 
File input/output operations and format conversions for fields.
 
void readFieldHeader(std::istream &in, int &nMonomer, UnitCell< D > &unitCell, bool &isSymmetric) const
Reader header of field file (fortran PSCF format)
 
void readFieldsRGridData(std::istream &in, DArray< RField< D > > &fields, int nMonomer) const override
Read data for an array of r-grid fields, with no header section.
 
RGridTrajectoryReader(System< D > &system)
Constructor.
 
void open(std::string filename)
Open trajectory file and read header, if any.
 
void allocate()
Allocate memory required by trajectory reader.
 
bool readFrame()
Read a single frame.
 
void close()
Close the trajectory file.
 
void readHeader()
Read header of trajectory file.
 
Main class, representing a complete physical system.
 
TrajectoryReader(System< D > &system)
Constructor.
 
System< D > & system()
Return reference to parent system.
 
static std::ostream & file()
Get log ostream by reference.
 
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
 
#define UTIL_THROW(msg)
Macro for throwing an Exception, reporting function, file and line number.
 
void checkString(std::istream &in, const std::string &expected)
Extract string from stream, and compare to expected value.
 
bool getNextLine(std::istream &in, std::string &line)
Read the next non-empty line into a string, strip trailing whitespace.
 
bool hasSymmetry(AT const &in, Basis< D > const &basis, IntVec< D > const &dftDimensions, double epsilon=1.0e-8, bool verbose=true)
Check if a k-grid field has the declared space group symmetry.
 
Real periodic fields, SCFT and PS-FTS (CPU).
 
PSCF package top-level namespace.