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

Comparing branches/development/src/brains/ForceManager.hpp (file contents):
Revision 1465 by chuckv, Fri Jul 9 23:08:25 2010 UTC vs.
Revision 1570 by gezelter, Thu May 26 21:56:04 2011 UTC

# Line 52 | Line 52
52  
53   #include "brains/SimInfo.hpp"
54   #include "primitives/Molecule.hpp"
55 + #include "nonbonded/InteractionManager.hpp"
56 + #include "parallel/ForceDecomposition.hpp"
57 +
58 + #define PREPAIR_LOOP 0
59 + #define PAIR_LOOP 1
60 +
61 + using namespace std;
62   namespace OpenMD {
63    /**
64     * @class ForceManager ForceManager.hpp "brains/ForceManager.hpp"
65     * ForceManager is responsible for calculating the short range
66 <   * interactions (C++) and long range interactions (Fortran). If the
60 <   * Fortran side is not set up before the force calculation, call
61 <   * SimInfo's update function to settle it down.
66 >   * interactions and long range interactions.
67     *
68 <   * @note the reason we delay fortran side's setup is that some
69 <   * applications (Dump2XYZ etc.) may not need force calculation, so why
70 <   * bother?
68 >   * @note the reason we delay some of the setup is that some
69 >   * applications (Dump2XYZ etc.) may not need force calculation, so
70 >   * why bother?
71     */
72    class ForceManager {
73  
74    public:
75 <    ForceManager(SimInfo * info) : info_(info) {}
76 <        
75 >    
76 >    ForceManager(SimInfo * info);                          
77      virtual ~ForceManager() {}
73
74    // public virtual functions should be avoided
75    /**@todo needs refactoring */
78      virtual void calcForces();
79 +    virtual void init() {};
80  
78    virtual void init() {}
81    protected:
82  
83 <    virtual void preCalculation();
84 <        
85 <    virtual void calcShortRangeInteraction();
84 <
85 <    virtual void calcLongRangeInteraction();
86 <
83 >    virtual void preCalculation();        
84 >    virtual void shortRangeInteractions();
85 >    virtual void longRangeInteractions();
86      virtual void postCalculation();
87  
88      SimInfo * info_;        
89 <
90 <    std::map<Bend*, BendDataSet> bendDataSets;
91 <    std::map<Torsion*, TorsionDataSet> torsionDataSets;
93 <    std::map<Inversion*, InversionDataSet> inversionDataSets;
89 >    map<Bend*, BendDataSet> bendDataSets;
90 >    map<Torsion*, TorsionDataSet> torsionDataSets;
91 >    map<Inversion*, InversionDataSet> inversionDataSets;
92      Mat3x3d tau;
95    
96  };
93  
94 < } //end namespace OpenMD
94 >    InteractionManager* interactionMan_;
95 >    ForceDecomposition* fDecomp_;
96 >    SwitchingFunction* swfun_;
97 >    vector<pair<int, int> > neighborList;
98 >    map< pair<int, int>, pair<RealType, RealType> > groupCutoffMap;    
99 >  };
100 >  
101 > }
102   #endif //BRAINS_FORCEMANAGER_HPP

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines