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 246 by gezelter, Wed Jan 12 22:41:40 2005 UTC vs.
Revision 1211 by gezelter, Wed Jan 23 16:38:22 2008 UTC

# Line 1 | Line 1
1 < /*
1 > /*
2   * Copyright (c) 2005 The University of Notre Dame. All Rights Reserved.
3   *
4   * The University of Notre Dame grants you ("Licensee") a
# 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),
46 +                             atomType_(at) {
47 +    mass_ = at->getMass();
48 +  }
49  
50 < Atom::Atom(AtomType* at) : StuntDouble(otAtom, &Snapshot::atomData) ,atomType_(at) {
46 < mass_ = at->getMass();
47 < }
48 <
49 < Mat3x3d Atom::getI() {
50 >  Mat3x3d Atom::getI() {
51      return Mat3x3d::identity();
52 < }    
53 <
54 < std::vector<double> Atom::getGrad() {
55 <     std::vector<double> grad(3);
52 >  }    
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 <
65 < void Atom::accept(BaseVisitor* v) {
63 >  }    
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