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