ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-2.0/src/integrators/NPT.hpp
(Generate patch)

Comparing branches/new_design/OOPSE-2.0/src/integrators/NPT.hpp (file contents):
Revision 1773 by tim, Fri Nov 19 21:38:22 2004 UTC vs.
Revision 1774 by tim, Tue Nov 23 23:12:23 2004 UTC

# Line 43 | Line 43 | namespace oopse {
43              NPT(SimInfo * theInfo, ForceFields * the_ff);
44              virtual~NPT();
45  
46 <            virtual void integrateStep(int calcPot, int calcStress) {
47 <                calcStress = 1;
48 <                T::integrateStep(calcPot, calcStress);
46 >
47 >            int getMaxIterationNumber() {
48 >                return maxIterNum_;
49              }
50  
51 <            virtual double getConservedQuantity(void) = 0;
52 <            virtual string getAdditionalParameters(void) = 0;
53 <
54 <            double myTauThermo() {
51 >            void setMaxIterationNumber(int maxIter) {
52 >                maxIterNum_ = maxIter;
53 >            }
54 >            double getTauThermostat() {
55                  return tauThermostat;
56              }
57  
58            double myTauBaro() {
59                return tauBarostat;
60            }
61
58              void setTauThermostat(double tt) {
59                  tauThermostat = tt;
64                have_tau_thermostat = 1;
60              }
61  
62 +            double getTauBarostat() {
63 +                return tauBarostat;
64 +            }
65              void setTauBarostat(double tb) {
66                  tauBarostat = tb;
69                have_tau_barostat = 1;
67              }
68  
69 +            double getTargetTemp() {
70 +                return targetTemp;
71 +            }
72 +            
73              void setTargetTemp(double tt) {
74                  targetTemp = tt;
74                have_target_temp = 1;
75              }
76  
77 +            double getTargetPressure() {
78 +                return targetTemp;
79 +            }
80 +            
81              void setTargetPressure(double tp) {
82                  targetPressure = tp;
79                have_target_pressure = 1;
83              }
84  
85 +            double getChiTolerance() {
86 +                return chiTolerance;
87 +            }
88 +            
89              void setChiTolerance(double tol) {
90                  chiTolerance = tol;
84                have_chi_tolerance = 1;
91              }
92  
93 <            void setPosIterTolerance(double tol) {
94 <                posIterTolerance = tol;
89 <                have_pos_iter_tolerance = 1;
93 >            double getEtaTolerance() {
94 >                return etaTolerance;
95              }
96 <
96 >            
97              void setEtaTolerance(double tol) {
98                  etaTolerance = tol;
94                have_eta_tolerance = 1;
99              }
100  
101          protected:
102  
103 <            virtual void moveA();
104 <            virtual void moveB();
103 >            virtual void integrateStep(int calcPot, int calcStress) {
104 >                calcStress = 1;
105 >                T::integrateStep(calcPot, calcStress);
106 >            }
107 >            
108 >            double NkBT;
109 >            double fkBT;
110  
111 <            virtual int readyCheck();
111 >            double tt2;            
112 >            double tb2;
113 >            
114 >            double instaTemp;
115 >            double instaPress;
116 >            double instaVol;
117 >            Vector3d press;
118  
119 <            virtual void resetIntegrator();
119 >            // targetTemp, targetPressure, and tauBarostat must be set.
120 >            // One of qmass or tauThermostat must be set;
121  
122 <            virtual void getVelScaleA(double sc[3], double vel[3]) = 0;
123 <            virtual void getVelScaleB(double sc[3], int index) = 0;
124 <            virtual void getPosScale(double pos[3], double COM[3], int index,
125 <                                     double sc[3]) = 0;
122 >            double targetTemp;
123 >            double targetPressure;
124 >            double tauThermostat;
125 >            double tauBarostat;
126  
127 +            std::vector<Vector3d> oldPos;
128 +            std::vector<Vector3d> oldVel;
129 +            std::vector<Vector3d> oldJi;
130 +
131 +            double etaTolerance;
132 +            
133 +        private:
134 +
135 +            virtual void moveA();
136 +            virtual void moveB();
137 +            
138 +            virtual void getVelScaleA(Vector3d& sc, const Vector3d& vel) = 0;
139 +            virtual void getVelScaleB(Vector3d& sc, int index ) = 0;
140 +            virtual void getVelScaleA(Vector3d& sc, const Vector3d& vel) = 0;
141 +            virtual void getVelScaleB(Vector3d& sc, int index) = 0;
142 +            virtual void getPosScale(const Vector3d& pos, const Vector3d& COM,
143 +                                               int index, Vector3d& sc) = 0;
144              virtual void calcVelScale() = 0;
145  
146              virtual bool chiConverged();
# Line 119 | Line 152 | namespace oopse {
152              virtual void evolveEtaB() = 0;
153  
154              virtual void scaleSimBox() = 0;
155 +            
156 +            virtual double calcConservedQuantity() = 0;      
157 +            
158 +            int maxIterNum_;
159  
123            void accIntegralOfChidt(void) {
124                integralOfChidt += dt * chi;
125            }
126
127            // chi and eta are the propagated degrees of freedom
128
160              double oldChi;
161              double prevChi;
162 <            double chi;
163 <            double NkBT;
133 <            double fkBT;
134 <
135 <            double tt2,
136 <                   tb2;
137 <            double instaTemp,
138 <                   instaPress,
139 <                   instaVol;
140 <            double press[3][3];
141 <
142 <            int Nparticles;
143 <
144 <            double integralOfChidt;
145 <
146 <            // targetTemp, targetPressure, and tauBarostat must be set.
147 <            // One of qmass or tauThermostat must be set;
148 <
149 <            double targetTemp;
150 <            double targetPressure;
151 <            double tauThermostat;
152 <            double tauBarostat;
153 <
154 <            short int have_tau_thermostat,
155 <                      have_tau_barostat,
156 <                      have_target_temp;
157 <            short int have_target_pressure;
158 <
159 <            double * oldPos;
160 <            double * oldVel;
161 <            double * oldJi;
162 <
163 <            double chiTolerance;
164 <            short int have_chi_tolerance;
165 <            double posIterTolerance;
166 <            short int have_pos_iter_tolerance;
167 <            double etaTolerance;
168 <            short int have_eta_tolerance;
162 >            double chi;        
163 >            double chiTolerance;            
164      };
165  
166   }      //end namespace oopse

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines