proj home

Files   Classes   Functions   Hierarchy  

particleranvd.h

Go to the documentation of this file.
00001 #ifndef PARTICLERANVD_H
00002 #define PARTICLERANVD_H
00003 
00004 #include <cassert>
00005 #include <cmath>
00006 using namespace std;
00007 
00008 #include <particle.h>
00009 #include <boxcollision.h>
00010 #include <random.h>
00011 
00012 
00018 class particledistribution
00019 {
00020 protected:
00022   random11<> r11;
00023 
00024 public:
00025 
00027   double radius;
00029   double vmax;
00031   double theta0;
00032 
00034   boxcollision box;
00035 
00037   particledistribution()
00038     : radius(0.0), vmax(0.0), theta0(0.0),
00039       box(0.0,0.0,0.0,0.0) {}
00040 
00042   void randomposition(particle & p) const
00043   {
00044     doublec pradius(p.radius);
00045     p.pos[0] = box.x0 + pradius + (box.x1-box.x0-2.0*pradius)*r11();
00046     p.pos[1] = box.y0 + pradius + (box.y1-box.y0-2.0*pradius)*r11();
00047   }
00048 };
00049 
00050 
00054 class particleranvd : public particledistribution 
00055 {
00056 public:
00057 
00058   particleranvd
00059   (
00060     doublec radius_,
00061     doublec vmax_, 
00062     boxcollision const & box_
00063   );
00064   
00066   void eval(particle & p) const;
00067 };
00068 
00072 class particlev0 : public particledistribution
00073 {
00074 public:
00075 
00076   particlev0
00077   (
00078     doublec radius_,
00079     doublec vmax_, 
00080     boxcollision const & box_
00081   );
00082   
00084   void eval(particle & p) const;
00085 };
00086 
00090 class particlev0theta0 : public particledistribution
00091 {
00092 public:
00093 
00094   particlev0theta0
00095   (
00096     doublec radius_,
00097     doublec vmax_, 
00098     boxcollision const & box_
00099   );
00100   
00102   void eval(particle & p) const;
00103 };
00104 
00107 class particlev0spaced : public particledistribution
00108 {
00109 public:
00110 
00111   particlev0spaced 
00112   (
00113     doublec radius_,
00114     doublec vmax_, 
00115     boxcollision const & box_
00116   );
00117   
00119   void eval(particle & p) const;
00120 };
00121 
00122 #endif
00123 
00124 

Generated on Fri Mar 4 00:49:29 2011 for Chelton Evans Source by  doxygen 1.5.8