ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE_old/src/mdtools/libmdCode/DirectionalAtom.cpp
(Generate patch)

Comparing trunk/OOPSE_old/src/mdtools/libmdCode/DirectionalAtom.cpp (file contents):
Revision 296 by mmeineke, Thu Mar 6 20:05:39 2003 UTC vs.
Revision 299 by mmeineke, Fri Mar 7 19:31:02 2003 UTC

# Line 15 | Line 15 | void DirectionalAtom::setA( double the_A[3][3] ){
15    Amat[Axx] = the_A[0][0]; Amat[Axy] = the_A[0][1]; Amat[Axz] = the_A[0][2];
16    Amat[Ayx] = the_A[1][0]; Amat[Ayy] = the_A[1][1]; Amat[Ayz] = the_A[1][2];
17    Amat[Azx] = the_A[2][0]; Amat[Azy] = the_A[2][1]; Amat[Azz] = the_A[2][2];
18 <  
19 <  this->body2Lab( &ul[offsetX] );
18 >
19 >  this->updateU();  
20   }
21  
22   void DirectionalAtom::setI( double the_I[3][3] ){
# Line 48 | Line 48 | void DirectionalAtom::setQ( double the_q[4] ){
48    Amat[Azy] = 2.0 * ( the_q[2] * the_q[3] - the_q[0] * the_q[1] );
49    Amat[Azz] = q0Sqr - q1Sqr -q2Sqr +q3Sqr;
50  
51 <  this->body2Lab( &ul[offsetX] );
51 >  this->updateU();
52   }
53  
54   void DirectionalAtom::getA( double the_A[3][3] ){
# Line 138 | Line 138 | void DirectionalAtom::setEuler( double phi, double the
138    Amat[Azy] = -cos(phi) * sin(theta);
139    Amat[Azz] = cos(theta);
140  
141 <  this->body2Lab( &ul[offsetX] );
141 >  this->updateU();
142   }
143  
144  
# Line 168 | Line 168 | void DirectionalAtom::body2Lab( double r[3] ){
168    r[2] = (Amat[Axz] * rb[0]) + (Amat[Ayz] * rb[1]) + (Amat[Azz] * rb[2]);
169   }
170  
171 + void DirectionalAtom::updateU( void ){
172 +
173 +  r[offsetX] = (Amat[Axx] * sux) + (Amat[Ayx] * suy) + (Amat[Azx] * suz);
174 +  r[offsetY] = (Amat[Axy] * sux) + (Amat[Ayy] * suy) + (Amat[Azy] * suz);
175 +  r[offsetZ] = (Amat[Axz] * sux) + (Amat[Ayz] * suy) + (Amat[Azz] * suz);
176 + }
177 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines