--- trunk/OOPSE/libmdtools/SimInfo.cpp 2003/07/10 22:15:53 590 +++ trunk/OOPSE/libmdtools/SimInfo.cpp 2003/07/14 21:28:54 597 @@ -265,8 +265,40 @@ void SimInfo::matVecMul3(double m[3][3], double inVec[ outVec[0] = m[0][0]*a0 + m[0][1]*a1 + m[0][2]*a2; outVec[1] = m[1][0]*a0 + m[1][1]*a1 + m[1][2]*a2; outVec[2] = m[2][0]*a0 + m[2][1]*a1 + m[2][2]*a2; +} + +void SimInfo::transposeMat3(double in[3][3], double out[3][3]) { + double temp[3][3]; + int i, j; + + for (i = 0; i < 3; i++) { + for (j = 0; j < 3; j++) { + temp[j][i] = in[i][j]; + } + } + for (i = 0; i < 3; i++) { + for (j = 0; j < 3; j++) { + out[i][j] = temp[i][j]; + } + } } +void SimInfo::printMat3(double A[3][3] ){ + + std::cerr + << "[ " << A[0][0] << ", " << A[0][1] << ", " << A[0][2] << " ]\n" + << "[ " << A[1][0] << ", " << A[1][1] << ", " << A[1][2] << " ]\n" + << "[ " << A[2][0] << ", " << A[2][1] << ", " << A[2][2] << " ]\n"; +} + +void SimInfo::printMat9(double A[9] ){ + + std::cerr + << "[ " << A[0] << ", " << A[1] << ", " << A[2] << " ]\n" + << "[ " << A[3] << ", " << A[4] << ", " << A[5] << " ]\n" + << "[ " << A[6] << ", " << A[7] << ", " << A[8] << " ]\n"; +} + void SimInfo::calcBoxL( void ){ double dx, dy, dz, dsq;