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

Comparing branches/development/src/nonbonded/InteractionManager.hpp (file contents):
Revision 1568 by gezelter, Wed May 25 16:20:37 2011 UTC vs.
Revision 1584 by gezelter, Fri Jun 17 20:16:35 2011 UTC

# Line 57 | Line 57 | namespace OpenMD {
57   using namespace std;
58  
59   namespace OpenMD {
60  enum CutoffMethod {
61    HARD,
62    SWITCHED,
63    SHIFTED_POTENTIAL,
64    SHIFTED_FORCE
65  };
60  
61    /**
62     * @class InteractionManager InteractionManager is responsible for
63 <   * keeping track of the non-bonded interactions (C++) and providing
70 <   * an interface to the low-level loop (Fortran).
63 >   * keeping track of the non-bonded interactions (C++)
64     */
65    class InteractionManager {
66  
67    public:
68 <    static InteractionManager* Instance();
69 <    static void setSimInfo(SimInfo* info) {info_ = info;}
70 <    static void initialize();
68 >    InteractionManager();
69 >    ~InteractionManager();
70 >    void setSimInfo(SimInfo* info) {info_ = info;}
71 >    void initialize();
72  
73      // Fortran support routines
74  
75 <    static void doPrePair(InteractionData idat);
76 <    static void doPreForce(SelfData sdat);
77 <    static void doPair(InteractionData idat);    
78 <    static void doSkipCorrection(InteractionData idat);
79 <    static void doSelfCorrection(SelfData sdat);
80 <    static RealType getSuggestedCutoffRadius(int *atid1);  
81 <    static RealType getSuggestedCutoffRadius(AtomType *atype);
82 <    SwitchingFunction* getSwitchingFunction() {return switcher_;}
75 >    void doPrePair(InteractionData idat);
76 >    void doPreForce(SelfData sdat);
77 >    void doPair(InteractionData idat);    
78 >    void doSkipCorrection(InteractionData idat);
79 >    void doSelfCorrection(SelfData sdat);
80 >    void setCutoffRadius(RealType rCut);
81 >    void setSwitchingRadius(RealType rSwitch);
82 >    RealType getSuggestedCutoffRadius(int *atid1);  
83 >    RealType getSuggestedCutoffRadius(AtomType *atype);
84      
85    private:
86 <    virtual ~InteractionManager() { }
92 <    // singleton pattern, prevent reconstruction
93 <    InteractionManager() { }
94 <    InteractionManager(InteractionManager const&) {};
95 <    InteractionManager& operator=(InteractionManager const&) {};
96 <    static InteractionManager* _instance;
86 >    bool initialized_;
87  
88 <    static bool initialized_;
88 >    void setupElectrostatics();
89  
90 <    static void setupCutoffs();
91 <    static void setupSwitching();
92 <    static void setupElectrostatics();
93 <
94 <    static SimInfo* info_;
95 <    static LJ* lj_;
96 <    static GB* gb_;
97 <    static Sticky* sticky_;
98 <    static EAM* eam_;
99 <    static SC* sc_;
100 <    static Morse* morse_;
111 <    static Electrostatic* electrostatic_;
112 <    static MAW* maw_;
113 <    static SwitchingFunction* switcher_;
114 <
115 <    static RealType rCut_;            /**< cutoff radius for non-bonded interactions */
116 <    static RealType rSwitch_;         /**< inner radius of switching function */
117 <    static CutoffMethod cutoffMethod_;/**< Cutoff Method for most non-bonded interactions */
118 <    static SwitchingFunctionType sft_;/**< Type of switching function in use */
119 <
120 <    static RealType vdwScale_[4];
121 <    static RealType electrostaticScale_[4];
122 <  
123 <    static map<int, AtomType*> typeMap_;
90 >    SimInfo* info_;
91 >    LJ* lj_;
92 >    GB* gb_;
93 >    Sticky* sticky_;
94 >    EAM* eam_;
95 >    SC* sc_;
96 >    Morse* morse_;
97 >    Electrostatic* electrostatic_;
98 >    MAW* maw_;
99 >    
100 >    map<int, AtomType*> typeMap_;
101      /**
102       * Each pair of atom types can have multiple interactions, so the
103       * natural data structures are a map between the pair, and a set
104       * of non-bonded interactions.
105       */
106 <    static map<pair<AtomType*, AtomType*>, set<NonBondedInteraction*> > interactions_;    
106 >    map<pair<AtomType*, AtomType*>, set<NonBondedInteraction*> > interactions_;    
107    };
108   }
109   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines