--- trunk/OOPSE/libmdtools/SimInfo.hpp 2003/07/08 20:56:10 574 +++ trunk/OOPSE/libmdtools/SimInfo.hpp 2003/07/10 17:10:56 588 @@ -56,22 +56,15 @@ class SimInfo{ (public) double lrPot; // the potential energy from the long range calculations. - double Hmat[9]; // the periodic boundry conditions. The Hmat is the - // column vectors of the x, y, and z box vectors. - // - // h1 h2 h3 - // [ Xx Yx Zx ] - // [ Xy Yy Zy ] - // [ Xz Yz Zz ] - // - // to preserve compatibility with Fortran the - // ordering in the array is as follows: - // - // [ 0 3 6 ] - // [ 1 4 7 ] - // [ 2 5 8 ] + double Hmat[3][3]; // the periodic boundry conditions. The Hmat is the + // column vectors of the x, y, and z box vectors. + // h1 h2 h3 + // [ Xx Yx Zx ] + // [ Xy Yy Zy ] + // [ Xz Yz Zz ] + // + double HmatInv[3][3]; - double HmatI[9]; // the inverted Hmat; double boxLx, boxLy, boxLz; // the box Lengths double boxVol; int orthoRhombic; @@ -130,15 +123,20 @@ class SimInfo{ (public) int getNDFraw(); void setBox( double newBox[3] ); - void setBoxM( double newBox[9] ); - void getBoxM( double theBox[9] ); + void setBoxM( double newBox[3][3] ); + void getBoxM( double theBox[3][3] ); void scaleBox( double scale ); void wrapVector( double thePos[3] ); + void matMul3(double a[3][3], double b[3][3], double out[3][3]); + void matVecMul3(double m[3][3], double inVec[3], double outVec[3]); + void invertMat3(double in[3][3], double out[3][3]); + double matDet3(double m[3][3]); + private: - void calcHmatI( void ); + void calcHmatInv( void ); void calcBoxL(); // private function to initialize the fortran side of the simulation