ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/primitives/Atom.cpp
(Generate patch)

Comparing trunk/src/primitives/Atom.cpp (file contents):
Revision 963 by tim, Wed May 17 21:51:42 2006 UTC vs.
Revision 1211 by gezelter, Wed Jan 23 16:38:22 2008 UTC

# Line 38 | Line 38
38   * University of Notre Dame has been advised of the possibility of
39   * such damages.
40   */
41 <
41 >
42   #include "primitives/Atom.hpp"
43   namespace oopse {
44 <
45 <  Atom::Atom(AtomType* at) : StuntDouble(otAtom, &Snapshot::atomData) ,atomType_(at) {
44 >  
45 >  Atom::Atom(AtomType* at) : StuntDouble(otAtom, &Snapshot::atomData),
46 >                             atomType_(at) {
47      mass_ = at->getMass();
48    }
49  
50    Mat3x3d Atom::getI() {
51      return Mat3x3d::identity();
52    }    
53 <
53 >  
54    std::vector<RealType> Atom::getGrad() {
55      std::vector<RealType> grad(3);
56      Vector3d force= getFrc();
57 <
57 >    
58      grad[0] = -force[0];
59      grad[1] = -force[1];
60      grad[2] = -force[2];
61      
62      return grad;
63    }    
64 <
64 >  
65    void Atom::accept(BaseVisitor* v) {
66      v->visit(this);
67 <  }    
67 <
67 >  }      
68   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines