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

Comparing branches/development/src/brains/ForceManager.cpp (file contents):
Revision 1549 by gezelter, Wed Apr 27 18:38:15 2011 UTC vs.
Revision 1550 by gezelter, Wed Apr 27 21:49:59 2011 UTC

# Line 49 | Line 49
49  
50   #include "brains/ForceManager.hpp"
51   #include "primitives/Molecule.hpp"
52 #include "UseTheForce/doForces_interface.h"
52   #define __OPENMD_C
54 #include "UseTheForce/DarkSide/fInteractionMap.h"
53   #include "utils/simError.h"
54   #include "primitives/Bond.hpp"
55   #include "primitives/Bend.hpp"
56   #include "primitives/Torsion.hpp"
57   #include "primitives/Inversion.hpp"
58   #include "parallel/ForceMatrixDecomposition.hpp"
59 < //#include "parallel/ForceSerialDecomposition.hpp"
59 > #include "nonbonded/NonBondedInteraction.hpp"
60  
61   using namespace std;
62   namespace OpenMD {
# Line 268 | Line 266 | namespace OpenMD {
266      }
267      
268      //initialize data before passing to fortran
269 <    RealType longRangePotential[LR_POT_TYPES];
269 >    RealType longRangePotential[N_INTERACTION_FAMILIES];
270      RealType lrPot = 0.0;
271      int isError = 0;
272  
273 <    for (int i=0; i<LR_POT_TYPES;i++){
273 >    // dangerous to iterate over enums, but we'll live on the edge:
274 >    for (int i = NO_FAMILY; i != N_INTERACTION_FAMILIES; ++i){
275        longRangePotential[i]=0.0; //Initialize array
276      }
277  
# Line 465 | Line 464 | namespace OpenMD {
464        }
465      }
466  
467 <    for (int i=0; i<LR_POT_TYPES;i++){
467 >    // dangerous to iterate over enums, but we'll live on the edge:
468 >    for (int i = NO_FAMILY; i != N_INTERACTION_FAMILIES; ++i){
469        lrPot += longRangePotential[i]; //Quick hack
470      }
471          
472      //store the tau and long range potential    
473      curSnapshot->statData[Stats::LONG_RANGE_POTENTIAL] = lrPot;
474 <    curSnapshot->statData[Stats::VANDERWAALS_POTENTIAL] = longRangePotential[VDW_POT];
475 <    curSnapshot->statData[Stats::ELECTROSTATIC_POTENTIAL] = longRangePotential[ELECTROSTATIC_POT];
474 >    curSnapshot->statData[Stats::VANDERWAALS_POTENTIAL] = longRangePotential[VANDERWAALS_FAMILY];
475 >    curSnapshot->statData[Stats::ELECTROSTATIC_POTENTIAL] = longRangePotential[ELECTROSTATIC_FAMILY];
476    }
477  
478    

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines