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

Comparing trunk/OOPSE/libmdtools/SimInfo.cpp (file contents):
Revision 588 by gezelter, Thu Jul 10 17:10:56 2003 UTC vs.
Revision 617 by gezelter, Tue Jul 15 19:56:08 2003 UTC

# Line 77 | Line 77 | void SimInfo::setBoxM( double theBox[3][3] ){
77    for(i=0; i < 3; i++)
78      for (j=0; j < 3; j++) Hmat[i][j] = theBox[i][j];
79    
80 <  cerr
81 <    << "setting Hmat ->\n"
82 <    << "[ " << Hmat[0][0] << ", " << Hmat[0][1] << ", " << Hmat[0][2] << " ]\n"
83 <    << "[ " << Hmat[1][0] << ", " << Hmat[1][1] << ", " << Hmat[1][2] << " ]\n"
84 <    << "[ " << Hmat[2][0] << ", " << Hmat[2][1] << ", " << Hmat[2][2] << " ]\n";
80 >  //  cerr
81 >  // << "setting Hmat ->\n"
82 >  // << "[ " << Hmat[0][0] << ", " << Hmat[0][1] << ", " << Hmat[0][2] << " ]\n"
83 >  // << "[ " << Hmat[1][0] << ", " << Hmat[1][1] << ", " << Hmat[1][2] << " ]\n"
84 >  // << "[ " << Hmat[2][0] << ", " << Hmat[2][1] << ", " << Hmat[2][2] << " ]\n";
85  
86    calcBoxL();
87    calcHmatInv();
# Line 93 | Line 93 | void SimInfo::setBoxM( double theBox[3][3] ){
93      }
94    }
95  
96 <  setFortranBoxSize(FortranHmat, FortranHmatI, &orthoRhombic);
96 >  setFortranBoxSize(FortranHmat, FortranHmatInv, &orthoRhombic);
97  
98    smallestBoxL = boxLx;
99    if (boxLy < smallestBoxL) smallestBoxL = boxLy;
# Line 153 | Line 153 | void SimInfo::scaleBox(double scale) {
153    double theBox[3][3];
154    int i, j;
155  
156 <  cerr << "Scaling box by " << scale << "\n";
156 >  // cerr << "Scaling box by " << scale << "\n";
157  
158    for(i=0; i<3; i++)
159      for (j=0; j<3; j++) theBox[i][j] = Hmat[i][j]*scale;
# Line 163 | Line 163 | void SimInfo::calcHmatInv( void ) {
163   }
164  
165   void SimInfo::calcHmatInv( void ) {
166 <
166 >  
167 >  int i,j;
168    double smallDiag;
169    double tol;
170    double sanity[3][3];
# Line 173 | Line 174 | void SimInfo::calcHmatInv( void ) {
174    // Check the inverse to make sure it is sane:
175  
176    matMul3( Hmat, HmatInv, sanity );
176
177  cerr << "sanity => \n"
178       << sanity[0][0] << "\t" << sanity[0][1] << "\t" << sanity [0][2] << "\n"
179       << sanity[1][0] << "\t" << sanity[1][1] << "\t" << sanity [1][2] << "\n"
180       << sanity[2][0] << "\t" << sanity[2][1] << "\t" << sanity [2][2]
181       << "\n";
177      
178    // check to see if Hmat is orthorhombic
179    
# Line 271 | Line 266 | void SimInfo::matVecMul3(double m[3][3], double inVec[
266    outVec[1] = m[1][0]*a0 + m[1][1]*a1 + m[1][2]*a2;
267    outVec[2] = m[2][0]*a0 + m[2][1]*a1 + m[2][2]*a2;
268   }
269 +
270 + void SimInfo::transposeMat3(double in[3][3], double out[3][3]) {
271 +  double temp[3][3];
272 +  int i, j;
273 +
274 +  for (i = 0; i < 3; i++) {
275 +    for (j = 0; j < 3; j++) {
276 +      temp[j][i] = in[i][j];
277 +    }
278 +  }
279 +  for (i = 0; i < 3; i++) {
280 +    for (j = 0; j < 3; j++) {
281 +      out[i][j] = temp[i][j];
282 +    }
283 +  }
284 + }
285    
286 + void SimInfo::printMat3(double A[3][3] ){
287 +
288 +  std::cerr
289 +            << "[ " << A[0][0] << ", " << A[0][1] << ", " << A[0][2] << " ]\n"
290 +            << "[ " << A[1][0] << ", " << A[1][1] << ", " << A[1][2] << " ]\n"
291 +            << "[ " << A[2][0] << ", " << A[2][1] << ", " << A[2][2] << " ]\n";
292 + }
293 +
294 + void SimInfo::printMat9(double A[9] ){
295 +
296 +  std::cerr
297 +            << "[ " << A[0] << ", " << A[1] << ", " << A[2] << " ]\n"
298 +            << "[ " << A[3] << ", " << A[4] << ", " << A[5] << " ]\n"
299 +            << "[ " << A[6] << ", " << A[7] << ", " << A[8] << " ]\n";
300 + }
301 +
302   void SimInfo::calcBoxL( void ){
303  
304    double dx, dy, dz, dsq;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines