Simpatico  v1.10
VelProf.h
1 #ifndef VEL_PROF_H
2 #define VEL_PROF_H
3 
4 /*
5 * Simpatico - Simulation Package for Polymeric and Molecular Liquids
6 *
7 * Copyright 2010 - 2014, The Regents of the University of Minnesota
8 * Distributed under the terms of the GNU General Public License.
9 */
10 
11 #include <mcMd/analyzers/SystemAnalyzer.h> // base class template
12 #include <mcMd/simulation/System.h> // class template parameter
13 #include <util/accumulators/Average.h> // member
14 #include <util/containers/DArray.h> // member template
15 #include <util/space/Vector.h> // member template parameter
16 
17 #include <cstdio>
18 #include <cstring>
19 
20 namespace Simp {
21  class Species;
22 }
23 
24 namespace McMd
25 {
26 
27  using namespace Util;
28  using namespace Simp;
29 
36  class VelProf : public SystemAnalyzer<System>
37  {
38 
39  public:
40 
46  VelProf(System &system);
47 
53  virtual void readParameters(std::istream& in);
54 
58  virtual void setup();
59 
65  virtual void sample(long iStep);
66 
70  virtual void output();
71 
72  private:
73 
75  std::ofstream outputFile_;
76 
78  int nSlabs_;
79 
81  int nSamplePerBlock_;
82 
84  DArray<Average> accumulator_;
85 
87  double totalMomentum_;
88 
90  DArray<double> velx_;
91 
93  DArray<int> nAtomi_;
94 
95  int nSpec_;
96 
97  double slabWidth_;
98 
99  int iBlock_;
100 
101  };
102 
103 }
104 #endif
A set of interacting Molecules enclosed by a Boundary.
Definition: System.h:115
Classes used by all simpatico molecular simulations.
Evaluates x-velocity profile as a function of z.
Definition: VelProf.h:36
Utility classes for scientific computation.
Definition: accumulators.mod:1
Template for Analyzer associated with one System.
Dynamically allocatable contiguous array template.
Definition: DArray.h:31
Single-processor Monte Carlo (MC) and molecular dynamics (MD).