ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/DirectionalAtom.cpp
(Generate patch)

Comparing trunk/OOPSE/libmdtools/DirectionalAtom.cpp (file contents):
Revision 378 by mmeineke, Fri Mar 21 17:42:12 2003 UTC vs.
Revision 599 by mmeineke, Mon Jul 14 21:48:43 2003 UTC

# Line 2 | Line 2 | double* Atom::pos; // the position array
2  
3   #include "Atom.hpp"
4  
5 double* Atom::pos; // the position array
6 double* Atom::vel; // the velocity array
7 double* Atom::frc; // the forc array
8 double* Atom::trq; // the torque vector  ( space fixed )
9 double* Atom::Amat; // the rotation matrix
10 double* Atom::mu;   // the array of dipole moments
11 double* Atom::ul;   // the lab frame unit directional vector
5  
6 +
7   void DirectionalAtom::setA( double the_A[3][3] ){
8    
9    Amat[Axx] = the_A[0][0]; Amat[Axy] = the_A[0][1]; Amat[Axz] = the_A[0][2];
# Line 66 | Line 60 | void DirectionalAtom::getA( double the_A[3][3] ){
60    the_A[2][2] = Amat[Azz];
61   }
62  
63 + void DirectionalAtom::printAmatIndex( void ){
64  
65 +  std::cerr << "Atom[" << index << "] index =>\n"
66 +            << "[ " << Axx << ", " << Axy << ", " << Axz << " ]\n"
67 +            << "[ " << Ayx << ", " << Ayy << ", " << Ayz << " ]\n"
68 +            << "[ " << Azx << ", " << Azy << ", " << Azz << " ]\n";
69 + }
70 +
71 +
72   void DirectionalAtom::getU( double the_u[3] ){
73    
74    the_u[0] = sux;
# Line 175 | Line 177 | void DirectionalAtom::updateU( void ){
177    ul[offsetZ] = (Amat[Axz] * sux) + (Amat[Ayz] * suy) + (Amat[Azz] * suz);
178   }
179  
180 + void DirectionalAtom::getJ( double theJ[3] ){
181 +  
182 +  theJ[0] = jx;
183 +  theJ[1] = jy;
184 +  theJ[2] = jz;
185 + }
186 +
187 + void DirectionalAtom::setJ( double theJ[3] ){
188 +  
189 +  jx = theJ[0];
190 +  jy = theJ[1];
191 +  jz = theJ[2];
192 + }
193 +
194 + void DirectionalAtom::getTrq( double theT[3] ){
195 +  
196 +  theT[0] = trq[offsetX];
197 +  theT[1] = trq[offsetY];
198 +  theT[2] = trq[offsetZ];
199 + }
200 +
201 + void DirectionalAtom::addTrq( double theT[3] ){
202 +  
203 +  trq[offsetX] += theT[0];
204 +  trq[offsetY] += theT[1];
205 +  trq[offsetZ] += theT[2];
206 + }
207 +
208 +
209 + void DirectionalAtom::getI( double the_I[3][3] ){
210 +  
211 +  the_I[0][0] = Ixx;
212 +  the_I[0][1] = Ixy;
213 +  the_I[0][2] = Ixz;
214 +
215 +  the_I[1][0] = Iyx;
216 +  the_I[1][1] = Iyy;
217 +  the_I[1][2] = Iyz;
218 +
219 +  the_I[2][0] = Izx;
220 +  the_I[2][1] = Izy;
221 +  the_I[2][2] = Izz;
222 + }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines