proj home

Files   Classes   Functions   Hierarchy  

particledistribution Class Reference

Common interface for distributions. A particular distribution uses only the variables it needs. All variables share the same interface to allow for variable bindings. More...

#include <particleranvd.h>

Inheritance diagram for particledistribution:
Collaboration diagram for particledistribution:

List of all members.

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].


Detailed Description

Common interface for distributions. A particular distribution uses only the variables it needs. All variables share the same interface to allow for variable bindings.

Definition at line 18 of file particleranvd.h.


Constructor & Destructor Documentation

particledistribution::particledistribution (  )  [inline]

Bad state.

Definition at line 37 of file particleranvd.h.

00038     : radius(0.0), vmax(0.0), theta0(0.0),
00039       box(0.0,0.0,0.0,0.0) {}


Member Function Documentation

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   }


Member Data Documentation

2D bounding box.

Definition at line 34 of file particleranvd.h.

Referenced by particlev0spaced::eval(), randomposition(), and test03().

Generate random numbers [0,1].

Definition at line 22 of file particleranvd.h.

Referenced by particlev0spaced::eval(), particlev0::eval(), particleranvd::eval(), and randomposition().

Particle radius.

Definition at line 27 of file particleranvd.h.

Referenced by particlev0spaced::eval(), particlev0theta0::eval(), particlev0::eval(), and particleranvd::eval().

Initial angle of particle.

Definition at line 31 of file particleranvd.h.

Referenced by particlev0theta0::eval().

Maximum particle velocity.

Definition at line 29 of file particleranvd.h.

Referenced by particlev0spaced::eval(), particlev0theta0::eval(), particlev0::eval(), and particleranvd::eval().


The documentation for this class was generated from the following file:

Generated on Fri Mar 4 00:50:08 2011 for Chelton Evans Source by  doxygen 1.5.8