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

Comparing trunk/OOPSE-4/src/primitives/DirectionalAtom.cpp (file contents):
Revision 2204 by gezelter, Fri Apr 15 22:04:00 2005 UTC vs.
Revision 2759 by tim, Wed May 17 21:51:42 2006 UTC

# Line 63 | Line 63 | namespace oopse {
63  
64        if (nLinearAxis > 1) {
65          sprintf( painCave.errMsg,
66 <                 "Directional Atom error.\n"
66 >                 "Directional Atom warning.\n"
67                   "\tOOPSE found more than one axis in this directional atom with a vanishing \n"
68                   "\tmoment of inertia.");
69 <        painCave.isFatal = 1;
69 >        painCave.isFatal = 0;
70          simError();
71        }
72        
# Line 104 | Line 104 | namespace oopse {
104      setA(m *getA());
105    }
106  
107 <  std::vector<double> DirectionalAtom::getGrad() {
108 <    std::vector<double> grad(6, 0.0);
107 >  std::vector<RealType> DirectionalAtom::getGrad() {
108 >    std::vector<RealType> grad(6, 0.0);
109      Vector3d force;
110      Vector3d torque;
111      Vector3d myEuler;
112 <    double phi, theta, psi;
113 <    double cphi, sphi, ctheta, stheta;
112 >    RealType phi, theta, psi;
113 >    RealType cphi, sphi, ctheta, stheta;
114      Vector3d ephi;
115      Vector3d etheta;
116      Vector3d epsi;
# Line 148 | Line 148 | namespace oopse {
148  
149      for (int j = 0; j < 3; j++ ) {
150  
151 <      grad[3] += torque[j]*ephi[j];
152 <      grad[4] += torque[j]*etheta[j];
153 <      grad[5] += torque[j]*epsi[j];
151 >      grad[3] -= torque[j]*ephi[j];
152 >      grad[4] -= torque[j]*etheta[j];
153 >      grad[5] -= torque[j]*epsi[j];
154  
155      }
156      

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines