Files Classes Functions Hierarchy
#include <particleranvd.h>
Public Member Functions | |
| particledistribution () | |
| Bad state. | |
| void | randomposition (particle &p) const |
| Randomly place the particle within the box. | |
Public Attributes | |
| double | radius |
| Particle radius. | |
| double | vmax |
| Maximum particle velocity. | |
| double | theta0 |
| Initial angle of particle. | |
| boxcollision | box |
| 2D bounding box. | |
Protected Attributes | |
| random11 | r11 |
| Generate random numbers [0,1]. | |
Definition at line 18 of file particleranvd.h.
| particledistribution::particledistribution | ( | ) | [inline] |
| void particledistribution::randomposition | ( | particle & | p | ) | const [inline] |
Randomly place the particle within the box.
Definition at line 42 of file particleranvd.h.
References box, particle::pos, r11, particle::radius, boxcollision::x0, boxcollision::x1, boxcollision::y0, and boxcollision::y1.
Referenced by particlev0theta0::eval(), particlev0::eval(), particleranvd::eval(), and test03().
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 }
2D bounding box.
Definition at line 34 of file particleranvd.h.
Referenced by particlev0spaced::eval(), randomposition(), and test03().
random11 particledistribution::r11 [protected] |
Generate random numbers [0,1].
Definition at line 22 of file particleranvd.h.
Referenced by particlev0spaced::eval(), particlev0::eval(), particleranvd::eval(), and randomposition().
| double particledistribution::radius |
Particle radius.
Definition at line 27 of file particleranvd.h.
Referenced by particlev0spaced::eval(), particlev0theta0::eval(), particlev0::eval(), and particleranvd::eval().
| double particledistribution::theta0 |
Initial angle of particle.
Definition at line 31 of file particleranvd.h.
Referenced by particlev0theta0::eval().
| double particledistribution::vmax |
Maximum particle velocity.
Definition at line 29 of file particleranvd.h.
Referenced by particlev0spaced::eval(), particlev0theta0::eval(), particlev0::eval(), and particleranvd::eval().
1.5.8