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

Comparing branches/development/src/optimization/PotentialEnergyObjectiveFunction.cpp (file contents):
Revision 1748 by gezelter, Wed Jun 6 19:54:09 2012 UTC vs.
Revision 1750 by gezelter, Thu Jun 7 12:53:46 2012 UTC

# Line 70 | Line 70 | namespace OpenMD{
70    
71    RealType PotentialEnergyObjectiveFunction::valueAndGradient(DynamicVector<RealType>& grad,
72                                                                const DynamicVector<RealType>& x) {
73  
73      setCoor(x);
74      shake_->constraintR();
75      forceMan_->calcForces();
# Line 131 | Line 130 | namespace OpenMD{
130             integrableObject != NULL;
131             integrableObject = mol->nextIntegrableObject(j)) {        
132          myGrad = integrableObject->getGrad();
133 <        for (size_t k = 0; k < myGrad.size(); ++k) {
133 >
134 >        for (size_t k = 0; k < myGrad.size(); ++k) {  
135            grad[index++] = myGrad[k];
136          }
137        }            

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines