Changes in src/boundary.cpp [112b09:c94eeb]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/boundary.cpp
r112b09 rc94eeb 22 22 #include "World.hpp" 23 23 #include "Plane.hpp" 24 #include "Matrix.hpp" 24 25 25 26 #include<gsl/gsl_poly.h> … … 764 765 int N[NDIM]; 765 766 int n[NDIM]; 766 double *M = ReturnFullMatrixforSymmetric(World::getInstance().getDomain()); 767 double Rotations[NDIM*NDIM]; 768 double *MInverse = InverseMatrix(M); 767 double *M_double = ReturnFullMatrixforSymmetric(World::getInstance().getDomain()); 768 Matrix M = Matrix(M_double); 769 delete[](M_double); 770 Matrix Rotations; 771 Matrix MInverse = M.invert(); 769 772 Vector AtomTranslations; 770 773 Vector FillerTranslations; … … 800 803 // calculate filler grid in [0,1]^3 801 804 FillerDistance = Vector(distance[0], distance[1], distance[2]); 802 FillerDistance. InverseMatrixMultiplication(M);805 FillerDistance.MatrixMultiplication(MInverse); 803 806 for(int i=0;i<NDIM;i++) 804 807 N[i] = (int) ceil(1./FillerDistance[i]); … … 835 838 } 836 839 837 Rotations [0]= cos(phi[0]) *cos(phi[2]) + (sin(phi[0])*sin(phi[1])*sin(phi[2]));838 Rotations [3]= sin(phi[0]) *cos(phi[2]) - (cos(phi[0])*sin(phi[1])*sin(phi[2]));839 Rotations [6]= cos(phi[1])*sin(phi[2]) ;840 Rotations [1]= - sin(phi[0])*cos(phi[1]) ;841 Rotations [4]= cos(phi[0])*cos(phi[1]) ;842 Rotations [7]= sin(phi[1]) ;843 Rotations [3]= - cos(phi[0]) *sin(phi[2]) + (sin(phi[0])*sin(phi[1])*cos(phi[2]));844 Rotations [5]= - sin(phi[0]) *sin(phi[2]) - (cos(phi[0])*sin(phi[1])*cos(phi[2]));845 Rotations [8]= cos(phi[1])*cos(phi[2]) ;840 Rotations.at(0,0) = cos(phi[0]) *cos(phi[2]) + (sin(phi[0])*sin(phi[1])*sin(phi[2])); 841 Rotations.at(0,1) = sin(phi[0]) *cos(phi[2]) - (cos(phi[0])*sin(phi[1])*sin(phi[2])); 842 Rotations.at(0,2) = cos(phi[1])*sin(phi[2]) ; 843 Rotations.at(1,0) = - sin(phi[0])*cos(phi[1]) ; 844 Rotations.at(1,1) = cos(phi[0])*cos(phi[1]) ; 845 Rotations.at(1,2) = sin(phi[1]) ; 846 Rotations.at(2,0) = - cos(phi[0]) *sin(phi[2]) + (sin(phi[0])*sin(phi[1])*cos(phi[2])); 847 Rotations.at(2,1) = - sin(phi[0]) *sin(phi[2]) - (cos(phi[0])*sin(phi[1])*cos(phi[2])); 848 Rotations.at(2,2) = cos(phi[1])*cos(phi[2]) ; 846 849 } 847 850 … … 892 895 } 893 896 } 894 delete[](M);895 delete[](MInverse);896 897 897 898 return Filling;
Note:
See TracChangeset
for help on using the changeset viewer.