Simpatico  v1.10
VirialStressTensorAverage.h
1 #ifndef DDMD_VIRIAL_STRESS_TENSOR_AVERAGE_H
2 #define DDMD_VIRIAL_STRESS_TENSOR_AVERAGE_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 #include <util/mpi/MpiLoader.h>
14 #include <util/space/Tensor.h>
15 #include <util/accumulators/Average.h>
16 
17 namespace DdMd
18 {
19 
20  using namespace Util;
21 
30  {
31 
32  public:
33 
40 
45  {}
46 
52  virtual void readParameters(std::istream& in);
53 
59  virtual void loadParameters(Serializable::IArchive &ar);
60 
66  virtual void save(Serializable::OArchive &ar);
67 
71  virtual void clear();
72 
78  virtual void sample(long iStep);
79 
83  virtual void output();
84 
85  private:
86 
88  std::ofstream outputFile_;
89 
91  Average sxxAccumulator_;
92 
94  Average sxyAccumulator_;
95 
97  Average sxzAccumulator_;
98 
100  Average syxAccumulator_;
101 
103  Average syyAccumulator_;
104 
106  Average syzAccumulator_;
107 
109  Average szxAccumulator_;
110 
112  Average szyAccumulator_;
113 
115  Average szzAccumulator_;
116 
118  int nSamplePerBlock_;
119 
121  long nSample_;
122 
124  long isInitialized_;
125 
126  };
127 
128 }
129 #endif
Abstract base for periodic output and/or analysis actions.
Calculates the average and variance of a sampled property.
Definition: Average.h:43
Parallel domain decomposition (DD) MD simulation.
Main object for a domain-decomposition MD simulation.
Saving / output archive for binary ostream.
Utility classes for scientific computation.
Definition: accumulators.mod:1
Compute average and output block averages of virial stress tensor.
Saving archive for binary istream.
virtual ~VirialStressTensorAverage()
Destructor.