00001
00002
00003
00004
00005
00006
00007 #ifndef __ADAPTIVEREPULSIONDATA_H__
00008 #define __ADAPTIVEREPULSIONDATA_H__
00009
00010 #include "Particles.h"
00011 #include "ParticleAttribute.h"
00012
00013
00014
00015
00016
00017
00018
00019 class AdaptiveRepulsionData : public ParticleAttribute {
00020
00021 public:
00022
00023 MAKE_PARTICLESTUFF_NAME();
00024
00025
00026 double sigma_hat;
00027 double sigma_max;
00028 double diameter;
00029
00030 double alpha;
00031 double Ehat;
00032
00033
00034
00035
00036 double sdmul;
00037
00038 int qlen();
00039 void getq(double *q);
00040 void setq(double *q);
00041 void qname(char **qn);
00042
00043
00044
00045
00046 std::vector<double> r;
00047
00048
00049 std::vector<double> dr;
00050
00051
00052 std::vector<double> D;
00053
00054 int qlenpp();
00055 void getqpp(double *q, int i);
00056 void setqpp(double *q, int i);
00057 void qnamepp(char **qn);
00058
00059 AdaptiveRepulsionData(Particles* ps=NULL,std::string name = std::string("AdaptiveRepulsionData"));
00060
00061 virtual void setParticleSystem(Particles *);
00062
00063 void clear();
00064
00065
00066
00067
00068
00069 void integrate(double dt);
00070
00071
00072 virtual void particleRemoved(unsigned int i);
00073
00074
00075 virtual void particleAdded(unsigned int i);
00076
00077 char *qtip(int i) { switch(i) {
00078 case 0: return "Desired distance between particles.";
00079 case 1: return "Maximum distance between particles.";
00080 case 2: return "Estimate of the diameter of the surface.";
00081 case 3: return "Amplitude of the repulsion force. Proportional to particle motion response time, "
00082 "but if too large may cause stiffness";
00083 case 4: return "Desired energy of the system. Too much energy leads to jittery particles. "
00084 "Too little causes the particle system to appear sluggish.";
00085 case 5: return "Repulsion force is a Gaussian. The sdmul parameter is the number of "
00086 "standard deviations away from a particle that its repulsion force is "
00087 "tapered to zero.";
00088 default: return "";
00089 }}
00090
00091 char *tip() { return "The AdaptiveRepulsionData particle attribute collects data shared "
00092 "by several behaviors that collectively keep particles spaced "
00093 "evenly.";
00094 }
00095 };
00096
00097 #endif