ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-4/src/integrators/Integrator.hpp
(Generate patch)

Comparing branches/new_design/OOPSE-4/src/integrators/Integrator.hpp (file contents):
Revision 1774 by tim, Tue Nov 23 23:12:23 2004 UTC vs.
Revision 1775 by tim, Wed Nov 24 17:42:37 2004 UTC

# Line 39 | Line 39 | namespace oopse {
39   /**
40   * @class Integrator Integrator.hpp "integrators/Integrator.hpp"
41   * @brief Base class of Integrator
42 + * @todo document
43   */
44   class Integrator {
45      public:
# Line 48 | Line 49 | class Integrator {
49          virtual void integrate() =0;
50  
51          virtual void update() {}
52 +
53 +        void setForceManager(ForceManager* forceMan) {
54 +            if (forceMan_  != NULL) {
55 +                delete forceMan_;
56 +            }
57 +            forceMan_ = forceMan;
58 +        }
59 +        
60      protected:
61 <        Integrator(SimInfo* info) : info_(info) {}
61 >        Integrator(SimInfo* info) : info_(info), forceMan_(NULL) {}
62          
63 +        SimInfo* info_;
64 +        ForceManager* forceMan_;
65 +
66 +    private:
67          virtual double calcConservedQuantity() = 0;
68  
56        SimInfo* info_;
69   };
70  
59
60 typedef GenericFactory<Integrator, std::string, Integrator* (*)(SimInfo*)> IntegratorFactory;
71      
72   }
73   #endif //INTEGRATORS_INTEGRATOR_HPP

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines