00001 #ifndef _BETA_OUTERSOFTABSMETRIC_ 00002 00003 #include "dynamMetric.h" 00004 00010 00011 class outerSoftAbsMetric: public dynamMetric 00012 { 00013 00014 public: 00015 00016 explicit outerSoftAbsMetric(int dim); 00017 virtual ~outerSoftAbsMetric() {}; 00018 00020 // Accessors // 00022 00023 double T(); 00024 double tau(); 00025 00026 void bounceP(const VectorXd& normal); 00027 00029 // Mutators // 00031 00032 void sampleP(Random& random); 00033 00035 void setSoftAbsAlpha(double a) { mSoftAbsAlpha = a; } 00036 00038 // Auxiliary Functions // 00040 00041 void checkEvolution(const double epsilon = 1e-6); 00042 00043 void prepareEvolution() { gradV(); fComputeH();} 00044 00045 protected: 00046 00047 double mSoftAbsAlpha; 00048 00049 MatrixXd mH; 00050 00051 VectorXd& fLambdaDot(const VectorXd& v); 00052 00053 virtual void fComputeH() = 0; 00054 00055 void fComputeMetric(); 00056 void fPrepareSpatialGradients() { fComputeH(); gradV(); } 00057 00058 VectorXd& dTaudp(); 00059 VectorXd& dTaudq(); 00060 VectorXd& dPhidq(); 00061 00062 00063 }; 00064 00065 #define _BETA_OUTERSOFTABSMETRIC_ 00066 #endif