Simpatico  v1.10
OutputEnergy.h
1 #ifndef DDMD_OUTPUT_ENERGY_H
2 #define DDMD_OUTPUT_ENERGY_H
3 
4 /*
5 * Simpatico - Simulation Package for Polymeric and Molecular Liquids
6 *
7 * Copyright 2010 - 2017, The Regents of the University of Minnesota
8 * Distributed under the terms of the GNU General Public License.
9 */
10 
11 #include <ddMd/analyzers/Analyzer.h>
12 #include <ddMd/simulation/Simulation.h>
13 
14 namespace DdMd
15 {
16 
17  using namespace Util;
18 
26  class OutputEnergy : public Analyzer
27  {
28 
29  public:
30 
36  OutputEnergy(Simulation& simulation);
37 
41  virtual ~OutputEnergy()
42  {}
43 
49  virtual void readParameters(std::istream& in);
50 
56  virtual void loadParameters(Serializable::IArchive &ar);
57 
63  virtual void save(Serializable::OArchive &ar);
64 
68  virtual void clear();
69 
73  virtual void setup();
74 
80  virtual void sample(long iStep);
81 
82  private:
83 
84  // Output file stream
85  std::ofstream outputFile_;
86 
88  long nSample_;
89 
91  long isInitialized_;
92 
93  };
94 
95 }
96 #endif
Abstract base for periodic output and/or analysis actions.
Parallel domain decomposition (DD) MD simulation.
Main object for a domain-decomposition MD simulation.
virtual ~OutputEnergy()
Destructor.
Definition: OutputEnergy.h:41
Saving / output archive for binary ostream.
Utility classes for scientific computation.
Definition: accumulators.mod:1
Saving archive for binary istream.
Periodically write simulation energies to file.
Definition: OutputEnergy.h:26