ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/NPTf.cpp
(Generate patch)

Comparing trunk/OOPSE/libmdtools/NPTf.cpp (file contents):
Revision 767 by tim, Tue Sep 16 20:02:11 2003 UTC vs.
Revision 857 by mmeineke, Fri Nov 7 17:09:48 2003 UTC

# Line 1 | Line 1
1 < #include <cmath>
1 > #include <math.h>
2 >
3   #include "Atom.hpp"
4   #include "SRI.hpp"
5   #include "AbstractClasses.hpp"
# Line 7 | Line 8
8   #include "Thermo.hpp"
9   #include "ReadWrite.hpp"
10   #include "Integrator.hpp"
11 < #include "simError.h"
11 > #include "simError.h"
12  
13 + #ifdef IS_MPI
14 + #include "mpiSimulation.hpp"
15 + #endif
16  
17   // Basic non-isotropic thermostating and barostating via the Melchionna
18   // modification of the Hoover algorithm:
19   //
20   //    Melchionna, S., Ciccotti, G., and Holian, B. L., 1993,
21 < //       Molec. Phys., 78, 533.
21 > //       Molec. Phys., 78, 533.
22   //
23   //           and
24 < //
24 > //
25   //    Hoover, W. G., 1986, Phys. Rev. A, 34, 2499.
26  
27   template<typename T> NPTf<T>::NPTf ( SimInfo *theInfo, ForceFields* the_ff):
28    T( theInfo, the_ff )
29   {
30 <  int i, j;
31 <  chi = 0.0;
32 <  integralOfChidt = 0.0;
30 >  GenericData* data;
31 >  DoubleArrayData * etaValue;
32 >  vector<double> etaArray;
33 >  int i,j;
34  
35 <  for(i = 0; i < 3; i++)
36 <    for (j = 0; j < 3; j++)
35 >  for(i = 0; i < 3; i++){
36 >    for (j = 0; j < 3; j++){
37 >
38        eta[i][j] = 0.0;
39 +      oldEta[i][j] = 0.0;
40 +    }
41 +  }
42  
34  have_tau_thermostat = 0;
35  have_tau_barostat = 0;
36  have_target_temp = 0;
37  have_target_pressure = 0;
43  
44 <  have_chi_tolerance = 0;
45 <  have_eta_tolerance = 0;
46 <  have_pos_iter_tolerance = 0;
44 >  if( theInfo->useInitXSstate ){
45 >    // retrieve eta array from simInfo if it exists
46 >    data = info->getProperty(ETAVALUE_ID);
47 >    if(data){
48 >      etaValue = dynamic_cast<DoubleArrayData*>(data);
49 >      
50 >      if(etaValue){
51 >        etaArray = etaValue->getData();
52 >        
53 >        for(i = 0; i < 3; i++){
54 >          for (j = 0; j < 3; j++){
55 >            eta[i][j] = etaArray[3*i+j];
56 >            oldEta[i][j] = eta[i][j];
57 >          }
58 >        }
59 >      }
60 >    }
61 >  }
62  
43  oldPos = new double[3*nAtoms];
44  oldVel = new double[3*nAtoms];
45  oldJi = new double[3*nAtoms];
46 #ifdef IS_MPI
47  Nparticles = mpiSim->getTotAtoms();
48 #else
49  Nparticles = theInfo->n_atoms;
50 #endif
63   }
64  
65   template<typename T> NPTf<T>::~NPTf() {
66 <  delete[] oldPos;
67 <  delete[] oldVel;
56 <  delete[] oldJi;
66 >
67 >  // empty for now
68   }
69  
70 < template<typename T> void NPTf<T>::moveA() {
60 <  
61 <  int i, j, k;
62 <  DirectionalAtom* dAtom;
63 <  double Tb[3], ji[3];
64 <  double A[3][3], I[3][3];
65 <  double angle, mass;
66 <  double vel[3], pos[3], frc[3];
70 > template<typename T> void NPTf<T>::resetIntegrator() {
71  
72 <  double rj[3];
69 <  double instaTemp, instaPress, instaVol;
70 <  double tt2, tb2;
71 <  double sc[3];
72 <  double eta2ij;
73 <  double press[3][3], vScale[3][3], hm[3][3], hmnew[3][3], scaleMat[3][3];
74 <  double bigScale, smallScale, offDiagMax;
75 <  double COM[3];
72 >  int i, j;
73  
74 <  tt2 = tauThermostat * tauThermostat;
75 <  tb2 = tauBarostat * tauBarostat;
74 >  for(i = 0; i < 3; i++)
75 >    for (j = 0; j < 3; j++)
76 >      eta[i][j] = 0.0;
77  
78 <  instaTemp = tStats->getTemperature();
79 <  tStats->getPressureTensor(press);
82 <  instaVol = tStats->getVolume();
83 <  
84 <  tStats->getCOM(COM);
78 >  T::resetIntegrator();
79 > }
80  
81 <  //calculate scale factor of veloity
87 <  for (i = 0; i < 3; i++ ) {
88 <    for (j = 0; j < 3; j++ ) {
89 <      vScale[i][j] = eta[i][j];
90 <      
91 <      if (i == j) {
92 <        vScale[i][j] += chi;          
93 <      }              
94 <    }
95 <  }
96 <  
97 <  //evolve velocity half step
98 <  for( i=0; i<nAtoms; i++ ){
81 > template<typename T> void NPTf<T>::evolveEtaA() {
82  
83 <    atoms[i]->getVel( vel );
101 <    atoms[i]->getFrc( frc );
83 >  int i, j;
84  
85 <    mass = atoms[i]->getMass();
86 <    
87 <    info->matVecMul3( vScale, vel, sc );
88 <
89 <    for (j=0; j < 3; j++) {
90 <      // velocity half step  (use chi from previous step here):
91 <      vel[j] += dt2 * ((frc[j]  / mass) * eConvert - sc[j]);
110 <  
85 >  for(i = 0; i < 3; i ++){
86 >    for(j = 0; j < 3; j++){
87 >      if( i == j)
88 >        eta[i][j] += dt2 *  instaVol *
89 >          (press[i][j] - targetPressure/p_convert) / (NkBT*tb2);
90 >      else
91 >        eta[i][j] += dt2 * instaVol * press[i][j] / (NkBT*tb2);
92      }
93 +  }
94  
95 <    atoms[i]->setVel( vel );
96 <  
97 <    if( atoms[i]->isDirectional() ){
95 >  for(i = 0; i < 3; i++)
96 >    for (j = 0; j < 3; j++)
97 >      oldEta[i][j] = eta[i][j];
98 > }
99  
100 <      dAtom = (DirectionalAtom *)atoms[i];
100 > template<typename T> void NPTf<T>::evolveEtaB() {
101  
102 <      // get and convert the torque to body frame
120 <      
121 <      dAtom->getTrq( Tb );
122 <      dAtom->lab2Body( Tb );
123 <      
124 <      // get the angular momentum, and propagate a half step
102 >  int i,j;
103  
104 <      dAtom->getJ( ji );
105 <
106 <      for (j=0; j < 3; j++)
129 <        ji[j] += dt2 * (Tb[j] * eConvert - ji[j]*chi);
130 <      
131 <      // use the angular velocities to propagate the rotation matrix a
132 <      // full time step
133 <
134 <      dAtom->getA(A);
135 <      dAtom->getI(I);
136 <    
137 <      // rotate about the x-axis      
138 <      angle = dt2 * ji[0] / I[0][0];
139 <      this->rotate( 1, 2, angle, ji, A );
104 >  for(i = 0; i < 3; i++)
105 >    for (j = 0; j < 3; j++)
106 >      prevEta[i][j] = eta[i][j];
107  
108 <      // rotate about the y-axis
109 <      angle = dt2 * ji[1] / I[1][1];
110 <      this->rotate( 2, 0, angle, ji, A );
111 <      
112 <      // rotate about the z-axis
113 <      angle = dt * ji[2] / I[2][2];
114 <      this->rotate( 0, 1, angle, ji, A);
115 <      
116 <      // rotate about the y-axis
150 <      angle = dt2 * ji[1] / I[1][1];
151 <      this->rotate( 2, 0, angle, ji, A );
152 <      
153 <       // rotate about the x-axis
154 <      angle = dt2 * ji[0] / I[0][0];
155 <      this->rotate( 1, 2, angle, ji, A );
156 <      
157 <      dAtom->setJ( ji );
158 <      dAtom->setA( A  );    
159 <    }    
108 >  for(i = 0; i < 3; i ++){
109 >    for(j = 0; j < 3; j++){
110 >      if( i == j) {
111 >        eta[i][j] = oldEta[i][j] + dt2 *  instaVol *
112 >          (press[i][j] - targetPressure/p_convert) / (NkBT*tb2);
113 >      } else {
114 >        eta[i][j] = oldEta[i][j] + dt2 * instaVol * press[i][j] / (NkBT*tb2);
115 >      }
116 >    }
117    }
118 + }
119  
120 <  // advance chi half step
121 <  chi += dt2 * ( instaTemp / targetTemp - 1.0) / tt2;
120 > template<typename T> void NPTf<T>::calcVelScale(void){
121 >  int i,j;
122  
123 <  //calculate the integral of chidt
124 <  integralOfChidt += dt2*chi;
123 >  for (i = 0; i < 3; i++ ) {
124 >    for (j = 0; j < 3; j++ ) {
125 >      vScale[i][j] = eta[i][j];
126  
127 <  //advance eta half step
128 <  for(i = 0; i < 3; i ++)
129 <    for(j = 0; j < 3; j++){
171 <      if( i == j)
172 <        eta[i][j] += dt2 *  instaVol *
173 <          (press[i][j] - targetPressure/p_convert) / (NkBT*tb2);
174 <      else
175 <        eta[i][j] += dt2 * instaVol * press[i][j] / ( NkBT*tb2);
127 >      if (i == j) {
128 >        vScale[i][j] += chi;
129 >      }
130      }
177    
178  //save the old positions
179  for(i = 0; i < nAtoms; i++){
180    atoms[i]->getPos(pos);
181    for(j = 0; j < 3; j++)
182      oldPos[i*3 + j] = pos[j];
131    }
132 <  
185 <  //the first estimation of r(t+dt) is equal to  r(t)
186 <    
187 <  for(k = 0; k < 4; k ++){
132 > }
133  
134 <    for(i =0 ; i < nAtoms; i++){
134 > template<typename T> void NPTf<T>::getVelScaleA(double sc[3], double vel[3]) {
135 >
136 >  info->matVecMul3( vScale, vel, sc );
137 > }
138  
139 <      atoms[i]->getVel(vel);
140 <      atoms[i]->getPos(pos);
139 > template<typename T> void NPTf<T>::getVelScaleB(double sc[3], int index ){
140 >  int j;
141 >  double myVel[3];
142 >  double vScale[3][3];
143  
144 <      for(j = 0; j < 3; j++)
145 <        rj[j] = (oldPos[i*3 + j] + pos[j])/2 - COM[j];
196 <      
197 <      info->matVecMul3( eta, rj, sc );
198 <      
199 <      for(j = 0; j < 3; j++)
200 <        pos[j] = oldPos[i*3 + j] + dt*(vel[j] + sc[j]);
144 >  for (j = 0; j < 3; j++)
145 >    myVel[j] = oldVel[3*index + j];
146  
147 <      atoms[i]->setPos( pos );
147 >  info->matVecMul3( vScale, myVel, sc );
148 > }
149  
150 <    }
150 > template<typename T> void NPTf<T>::getPosScale(double pos[3], double COM[3],
151 >                                               int index, double sc[3]){
152 >  int j;
153 >  double rj[3];
154  
155 <  }  
155 >  for(j=0; j<3; j++)
156 >    rj[j] = ( oldPos[index*3+j] + pos[j]) / 2.0 - COM[j];
157  
158 <
158 >  info->matVecMul3( eta, rj, sc );
159 > }
160 >
161 > template<typename T> void NPTf<T>::scaleSimBox( void ){
162 >
163 >  int i,j,k;
164 >  double scaleMat[3][3];
165 >  double eta2ij;
166 >  double bigScale, smallScale, offDiagMax;
167 >  double hm[3][3], hmnew[3][3];
168 >
169 >
170 >
171    // Scale the box after all the positions have been moved:
172 <  
172 >
173    // Use a taylor expansion for eta products:  Hmat = Hmat . exp(dt * etaMat)
174    //  Hmat = Hmat . ( Ident + dt * etaMat  + dt^2 * etaMat*etaMat / 2)
175 <  
175 >
176    bigScale = 1.0;
177    smallScale = 1.0;
178    offDiagMax = 0.0;
179 <  
179 >
180    for(i=0; i<3; i++){
181      for(j=0; j<3; j++){
182 <      
182 >
183        // Calculate the matrix Product of the eta array (we only need
184        // the ij element right now):
185 <      
185 >
186        eta2ij = 0.0;
187        for(k=0; k<3; k++){
188          eta2ij += eta[i][k] * eta[k][j];
189        }
190 <      
190 >
191        scaleMat[i][j] = 0.0;
192        // identity matrix (see above):
193        if (i == j) scaleMat[i][j] = 1.0;
# Line 233 | Line 195 | template<typename T> void NPTf<T>::moveA() {
195        scaleMat[i][j] += dt*eta[i][j]  + 0.5*dt*dt*eta2ij;
196  
197        if (i != j)
198 <        if (fabs(scaleMat[i][j]) > offDiagMax)
198 >        if (fabs(scaleMat[i][j]) > offDiagMax)
199            offDiagMax = fabs(scaleMat[i][j]);
200      }
201  
202      if (scaleMat[i][i] > bigScale) bigScale = scaleMat[i][i];
203      if (scaleMat[i][i] < smallScale) smallScale = scaleMat[i][i];
204    }
205 <  
206 <  if ((bigScale > 1.1) || (smallScale < 0.9)) {
205 >
206 >  if ((bigScale > 1.01) || (smallScale < 0.99)) {
207      sprintf( painCave.errMsg,
208 <             "NPTf error: Attempting a Box scaling of more than 10 percent.\n"
208 >             "NPTf error: Attempting a Box scaling of more than 1 percent.\n"
209               " Check your tauBarostat, as it is probably too small!\n\n"
210               " scaleMat = [%lf\t%lf\t%lf]\n"
211               "            [%lf\t%lf\t%lf]\n"
# Line 253 | Line 215 | template<typename T> void NPTf<T>::moveA() {
215               scaleMat[2][0],scaleMat[2][1],scaleMat[2][2]);
216      painCave.isFatal = 1;
217      simError();
218 <  } else if (offDiagMax > 0.1) {
218 >  } else if (offDiagMax > 0.01) {
219      sprintf( painCave.errMsg,
220 <             "NPTf error: Attempting an off-diagonal Box scaling of more than 10 percent.\n"
220 >             "NPTf error: Attempting an off-diagonal Box scaling of more than 1 percent.\n"
221               " Check your tauBarostat, as it is probably too small!\n\n"
222               " scaleMat = [%lf\t%lf\t%lf]\n"
223               "            [%lf\t%lf\t%lf]\n"
# Line 270 | Line 232 | template<typename T> void NPTf<T>::moveA() {
232      info->matMul3(hm, scaleMat, hmnew);
233      info->setBoxM(hmnew);
234    }
273  
235   }
236  
237 < template<typename T> void NPTf<T>::moveB( void ){
237 > template<typename T> bool NPTf<T>::etaConverged() {
238 >  int i;
239 >  double diffEta, sumEta;
240  
241 <  int i, j, k;
279 <  DirectionalAtom* dAtom;
280 <  double Tb[3], ji[3];
281 <  double vel[3], frc[3];
282 <  double mass;
283 <
284 <  double instaTemp, instaPress, instaVol;
285 <  double tt2, tb2;
286 <  double sc[3];
287 <  double press[3][3], vScale[3][3];
288 <  double oldChi, prevChi;
289 <  double oldEta[3][3], preEta[3][3], diffEta;
290 <  
291 <  tt2 = tauThermostat * tauThermostat;
292 <  tb2 = tauBarostat * tauBarostat;
293 <
294 <
295 <  // Set things up for the iteration:
296 <
297 <  oldChi = chi;
298 <  
241 >  sumEta = 0;
242    for(i = 0; i < 3; i++)
243 <    for(j = 0; j < 3; j++)
301 <      oldEta[i][j] = eta[i][j];
243 >    sumEta += pow(prevEta[i][i] - eta[i][i], 2);
244  
245 <  for( i=0; i<nAtoms; i++ ){
245 >  diffEta = sqrt( sumEta / 3.0 );
246  
247 <    atoms[i]->getVel( vel );
247 >  return ( diffEta <= etaTolerance );
248 > }
249  
250 <    for (j=0; j < 3; j++)
308 <      oldVel[3*i + j]  = vel[j];
250 > template<typename T> double NPTf<T>::getConservedQuantity(void){
251  
252 <    if( atoms[i]->isDirectional() ){
252 >  double conservedQuantity;
253 >  double totalEnergy;
254 >  double thermostat_kinetic;
255 >  double thermostat_potential;
256 >  double barostat_kinetic;
257 >  double barostat_potential;
258 >  double trEta;
259 >  double a[3][3], b[3][3];
260  
261 <      dAtom = (DirectionalAtom *)atoms[i];
261 >  totalEnergy = tStats->getTotalE();
262  
263 <      dAtom->getJ( ji );
263 >  thermostat_kinetic = fkBT * tt2 * chi * chi /
264 >    (2.0 * eConvert);
265  
266 <      for (j=0; j < 3; j++)
317 <        oldJi[3*i + j] = ji[j];
266 >  thermostat_potential = fkBT* integralOfChidt / eConvert;
267  
268 <    }
269 <  }
268 >  info->transposeMat3(eta, a);
269 >  info->matMul3(a, eta, b);
270 >  trEta = info->matTrace3(b);
271  
272 <  // do the iteration:
272 >  barostat_kinetic = NkBT * tb2 * trEta /
273 >    (2.0 * eConvert);
274  
275 <  instaVol = tStats->getVolume();
276 <  
326 <  for (k=0; k < 4; k++) {
327 <    
328 <    instaTemp = tStats->getTemperature();
329 <    tStats->getPressureTensor(press);
275 >  barostat_potential = (targetPressure * tStats->getVolume() / p_convert) /
276 >    eConvert;
277  
278 <    // evolve chi another half step using the temperature at t + dt/2
278 >  conservedQuantity = totalEnergy + thermostat_kinetic + thermostat_potential +
279 >    barostat_kinetic + barostat_potential;
280  
281 <    prevChi = chi;
334 <    chi = oldChi + dt2 * ( instaTemp / targetTemp - 1.0) / tt2;
335 <    
336 <    for(i = 0; i < 3; i++)
337 <      for(j = 0; j < 3; j++)
338 <        preEta[i][j] = eta[i][j];
281 >  return conservedQuantity;
282  
340    //advance eta half step and calculate scale factor for velocity
341    for(i = 0; i < 3; i ++)
342      for(j = 0; j < 3; j++){
343        if( i == j){
344          eta[i][j] = oldEta[i][j] + dt2 *  instaVol *
345            (press[i][j] - targetPressure/p_convert) / (NkBT*tb2);
346          vScale[i][j] = eta[i][j] + chi;
347        }
348        else
349        {
350          eta[i][j] = oldEta[i][j] + dt2 * instaVol * press[i][j] / (NkBT*tb2);
351          vScale[i][j] = eta[i][j];
352        }
353    }      
354
355    //advance velocity half step
356    for( i=0; i<nAtoms; i++ ){
357
358      atoms[i]->getFrc( frc );
359      atoms[i]->getVel(vel);
360      
361      mass = atoms[i]->getMass();
362      
363      info->matVecMul3( vScale, vel, sc );
364
365      for (j=0; j < 3; j++) {
366        // velocity half step  (use chi from previous step here):
367        vel[j] = oldVel[3*i+j] + dt2 * ((frc[j]  / mass) * eConvert - sc[j]);
368      }
369      
370      atoms[i]->setVel( vel );
371      
372      if( atoms[i]->isDirectional() ){
373
374        dAtom = (DirectionalAtom *)atoms[i];
375  
376        // get and convert the torque to body frame      
377  
378        dAtom->getTrq( Tb );
379        dAtom->lab2Body( Tb );      
380            
381        for (j=0; j < 3; j++)
382          ji[j] = oldJi[3*i + j] + dt2 * (Tb[j] * eConvert - oldJi[3*i+j]*chi);
383      
384          dAtom->setJ( ji );
385      }
386    }
387
388    
389    diffEta = 0;
390    for(i = 0; i < 3; i++)
391      diffEta += pow(preEta[i][i] - eta[i][i], 2);    
392    
393    if (fabs(prevChi - chi) <= chiTolerance && sqrt(diffEta / 3) <= etaTolerance)
394      break;
395  }
396
397  //calculate integral of chida
398  integralOfChidt += dt2*chi;
399
400  
283   }
284  
285 < template<typename T> void NPTf<T>::resetIntegrator() {
286 <  int i,j;
287 <  
288 <  chi = 0.0;
285 > template<typename T> string NPTf<T>::getAdditionalParameters(void){
286 >  string parameters;
287 >  const int BUFFERSIZE = 2000; // size of the read buffer
288 >  char buffer[BUFFERSIZE];
289  
290 <  for(i = 0; i < 3; i++)
291 <    for (j = 0; j < 3; j++)
410 <      eta[i][j] = 0.0;
290 >  sprintf(buffer,"\t%G\t%G;", chi, integralOfChidt);
291 >  parameters += buffer;
292  
293 < }
294 <
295 < template<typename T> int NPTf<T>::readyCheck() {
415 <
416 <  //check parent's readyCheck() first
417 <  if (T::readyCheck() == -1)
418 <    return -1;
419 <
420 <  // First check to see if we have a target temperature.
421 <  // Not having one is fatal.
422 <  
423 <  if (!have_target_temp) {
424 <    sprintf( painCave.errMsg,
425 <             "NPTf error: You can't use the NPTf integrator\n"
426 <             "   without a targetTemp!\n"
427 <             );
428 <    painCave.isFatal = 1;
429 <    simError();
430 <    return -1;
293 >  for(int i = 0; i < 3; i++){
294 >    sprintf(buffer,"\t%G\t%G\t%G;", eta[i][0], eta[i][1], eta[i][2]);
295 >    parameters += buffer;
296    }
297  
298 <  if (!have_target_pressure) {
434 <    sprintf( painCave.errMsg,
435 <             "NPTf error: You can't use the NPTf integrator\n"
436 <             "   without a targetPressure!\n"
437 <             );
438 <    painCave.isFatal = 1;
439 <    simError();
440 <    return -1;
441 <  }
442 <  
443 <  // We must set tauThermostat.
444 <  
445 <  if (!have_tau_thermostat) {
446 <    sprintf( painCave.errMsg,
447 <             "NPTf error: If you use the NPTf\n"
448 <             "   integrator, you must set tauThermostat.\n");
449 <    painCave.isFatal = 1;
450 <    simError();
451 <    return -1;
452 <  }    
298 >  return parameters;
299  
454  // We must set tauBarostat.
455  
456  if (!have_tau_barostat) {
457    sprintf( painCave.errMsg,
458             "NPTf error: If you use the NPTf\n"
459             "   integrator, you must set tauBarostat.\n");
460    painCave.isFatal = 1;
461    simError();
462    return -1;
463  }    
464
465  // We need NkBT a lot, so just set it here:
466
467  NkBT = (double)Nparticles * kB * targetTemp;
468  fkBT = (double)info->ndf * kB * targetTemp;
469
470  return 1;
300   }
472
473 template<typename T> double NPTf<T>::getConservedQuantity(void){
474
475  double conservedQuantity;
476  double tb2;
477  double trEta;  
478  double U;
479  double thermo;
480  double integral;
481  double baro;
482  double PV;
483
484  U = tStats->getTotalE();
485  thermo = (fkBT * tauThermostat * tauThermostat * chi * chi / 2.0) / eConvert;
486
487  tb2 = tauBarostat * tauBarostat;
488  trEta = info->matTrace3(eta);
489  baro = ((double)info->ndfTrans * kB * targetTemp * tb2 * trEta * trEta / 2.0) / eConvert;
490
491  integral = ((double)(info->ndf + 1) * kB * targetTemp * integralOfChidt) /eConvert;
492
493  PV = (targetPressure * tStats->getVolume() / p_convert) / eConvert;
494
495
496  cout.width(8);
497  cout.precision(8);
498  
499  cout << info->getTime() << "\t"
500       << chi << "\t"
501       << trEta << "\t"
502       << U << "\t"
503       << thermo << "\t"
504       << baro << "\t"
505       << integral << "\t"
506       << PV << "\t"
507       << U+thermo+integral+PV+baro << endl;
508
509  conservedQuantity = U+thermo+integral+PV+baro;
510  return conservedQuantity;
511  
512 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines