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 1545 by gezelter, Fri Apr 8 21:25:19 2011 UTC vs.
Revision 1656 by jmichalk, Tue Oct 11 19:46:51 2011 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines