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

Comparing branches/development/src/brains/ForceManager.hpp (file contents):
Revision 1467 by gezelter, Sat Jul 17 15:33:03 2010 UTC vs.
Revision 1545 by gezelter, Fri Apr 8 21:25:19 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/Decomposition.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), NBforcesInitialized_(false) {}
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();
82 <        
83 >    virtual void preCalculation();        
84      virtual void calcShortRangeInteraction();
84
85      virtual void calcLongRangeInteraction();
86
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;
93  
94 <    bool NBforcesInitialized_;
94 >    vector<pair<int, int> > neighborList_;
95 >
96 >    InteractionManager* nbiMan_;
97 >    Decomposition* decomp_;
98      
99    };
100 <
101 < } //end namespace OpenMD
100 >  
101 > }
102   #endif //BRAINS_FORCEMANAGER_HPP

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines