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

Comparing trunk/OOPSE-4/src/primitives/GhostBend.cpp (file contents):
Revision 1930 by gezelter, Wed Jan 12 22:41:40 2005 UTC vs.
Revision 2204 by gezelter, Fri Apr 15 22:04:00 2005 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 43 | Line 43 | namespace oopse {
43   #include "primitives/DirectionalAtom.hpp"
44   namespace oopse {
45  
46 < /**@todo still a lot left to improve*/
47 < void GhostBend::calcForce() {
46 >  /**@todo still a lot left to improve*/
47 >  void GhostBend::calcForce() {
48      DirectionalAtom* ghostAtom = static_cast<DirectionalAtom*>(atom2_);
49      
50      Vector3d pos1 = atom1_->getPos();
# Line 64 | Line 64 | void GhostBend::calcForce() {
64  
65      //check roundoff    
66      if (cosTheta > 1.0) {
67 <        cosTheta = 1.0;
67 >      cosTheta = 1.0;
68      } else if (cosTheta < -1.0) {
69 <        cosTheta = -1.0;
69 >      cosTheta = -1.0;
70      }
71  
72      double theta = acos(cosTheta);
# Line 78 | Line 78 | void GhostBend::calcForce() {
78      double sinTheta = sqrt(1.0 - cosTheta * cosTheta);
79  
80      if (fabs(sinTheta) < 1.0E-12) {
81 <        sinTheta = 1.0E-12;
81 >      sinTheta = 1.0E-12;
82      }
83  
84      double commonFactor1 = -firstDerivative / sinTheta * d12inv;
# Line 91 | Line 91 | void GhostBend::calcForce() {
91      /**@todo test correctness */
92      ghostAtom->addTrq(cross(r32, force3) );
93  
94 < }
94 >  }
95  
96   } //end namespace oopse
97  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines