SpherePackingScenarioGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Sphere.h
Go to the documentation of this file.
00001 #ifndef  LS2_SPHERE_H
00002 #define  LS2_SPHERE_H
00003 
00004 #include "tarch/la/Vector.h"
00005 #include "GlobalValue.h"
00006 #include "algorithms/geometries/SphereGeometry.h"
00007 namespace algorithms{
00008 namespace ls2{
00009 class Sphere;
00010 }
00011 }
00015 class algorithms::ls2::Sphere:public algorithms::geometries::SphereGeometry {
00016 
00017 public:
00021         Sphere();
00025         Sphere(const Sphere& s);
00029         Sphere(int i_i, tarch::la::Vector<DIM,double> x, tarch::la::Vector<DIM, int> cell_i, double lutime_i,double r_i, double gr_i,double m_i);
00033         ~Sphere();
00034         //friend class Box;
00035         Event getNextEvent() const;
00036         void setNextEvent(Event e);
00037         inline tarch::la::Vector<DIM, double>  getPosition() const {
00038                 return x;
00039         }
00040         void setPosition(tarch::la::Vector<DIM, double> x);
00041         inline double  getPosition(const unsigned int k) {
00042                 return x[k];
00043         }
00044 
00045         void setPosition(int k,double size);
00046         tarch::la::Vector<DIM, int> getCell();
00047         double getCell(int k);
00048         void setCell(tarch::la::Vector<DIM, int> cell);
00049         double getLastUpdateTime() const;
00050         void setLastUpdateTime(double time);
00051         inline tarch::la::Vector<DIM, double> getVelocity() const {
00052                 return v;
00053         }
00054         void setVelocity(tarch::la::Vector<DIM, double> v);
00055         void setVelocity(int k,double velocity);
00056         inline double getRadius() const {
00057                 return r;
00058         }
00059         void setRadius(double radius);
00060         double getGrowthrate() const;
00061         void setGrowthrate(double growthrate);
00062         double getMass() const;
00063         void setMass(double Mass);
00067         Event nextEvent;
00068 private:
00073         int i;
00074 
00078         Event nextcollision;
00079 
00083         tarch::la::Vector<DIM, double> x;
00087         tarch::la::Vector<DIM, int> cell;
00091         double lutime;
00095         tarch::la::Vector<DIM, double> v;
00096         // make sure efficent in memory
00097 
00098         double r;                       // sphere radius
00099         double gr;                      // sphere growth rate
00103         double m;
00104 
00105 
00106 };
00107 
00108 #endif 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines