*** empty log message ***
[charm.git] / examples / charm++ / Molecular / main.h
1 /*
2  University of Illinois at Urbana-Champaign
3  Department of Computer Science
4  Parallel Programming Lab
5  2008
6  Authors: Kumaresh Pattabiraman and Esteban Meneses
7 */
8
9 #include "charm++.h"
10 #include "time.h"
11
12 #define DEFAULT_MASS 1
13
14 // Class for keeping track of the properties for a particle
15 class Particle{
16         public:
17                 double mass;                                                    // mass of the particle
18                 double x;                                                                       // position in x axis
19                 double y;                                                                       // position in y axis
20                 double fx;                                                              // total forces on x axis
21                 double fy;                                                              // total forces on y axis
22                 double ax;                                                              // acceleration on x axis
23                 double ay;                                                              // acceleration on y axis
24                 double vx;                                                              // velocity on x axis
25                 double vy;                                                              // velocity on y axis
26
27         // Default constructor
28         Particle(){
29                 fx = fy = 0.0;
30         }
31
32                 // Function for pupping properties
33                 void pup(PUP::er &p) {
34                         p | mass;
35                         p | x;
36                         p | y;
37                         p | fx;
38                         p | fy;
39                         p | ax;
40                         p | ay;
41                         p | vx;
42                         p | vy;
43                 }
44
45 };