Simpatico  v1.10
SymmTensorAverageAnalyzer.h
1 #ifndef DDMD_SYMM_TENSOR_AVERAGE_ANALYZER_H
2 #define DDMD_SYMM_TENSOR_AVERAGE_ANALYZER_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 
13 namespace Util {
14  class Tensor;
15  class SymmTensorAverage;
16 }
17 
18 namespace DdMd
19 {
20 
21  class Simulation;
22 
23  using namespace Util;
24 
36  {
37 
38  public:
39 
46 
50  virtual ~SymmTensorAverageAnalyzer();
51 
61  virtual void readParameters(std::istream& in);
62 
68  virtual void loadParameters(Serializable::IArchive &ar);
69 
75  virtual void save(Serializable::OArchive &ar);
76 
80  virtual void clear();
81 
87  virtual void setup();
88 
94  virtual void sample(long iStep);
95 
99  virtual void output();
100 
101  protected:
102 
108  virtual void compute() = 0;
109 
115  virtual Tensor value() = 0;
116 
117  private:
118 
120  std::ofstream outputFile_;
121 
123  SymmTensorAverage *accumulatorPtr_;
124 
126  int nSamplePerBlock_;
127 
129  bool isInitialized_;
130 
131  };
132 
133 }
134 #endif
Abstract base for periodic output and/or analysis actions.
Parallel domain decomposition (DD) MD simulation.
Main object for a domain-decomposition MD simulation.
A Tensor represents a Cartesian tensor.
Definition: Tensor.h:32
Saving / output archive for binary ostream.
Calculates averages of all components of a Tensor-valued variable.
Utility classes for scientific computation.
Definition: accumulators.mod:1
Saving archive for binary istream.
Analyzer that computes average of a sequence of symmetric Tensor values.