![]() |
00001 #ifndef _BETA_DIAGOUTERSOFTABSMETRIC_ 00002 00003 #include <Eigen/Dense> 00004 00005 #include "dynamMetric.h" 00006 00012 00013 class diagOuterSoftAbsMetric: public dynamMetric 00014 { 00015 00016 public: 00017 00018 explicit diagOuterSoftAbsMetric(int dim); 00019 virtual ~diagOuterSoftAbsMetric() {}; 00020 00022 // Accessors // 00024 00025 double T(); 00026 double tau(); 00027 00028 void bounceP(const VectorXd& normal); 00029 00031 // Mutators // 00033 00034 void sampleP(Random& random); 00035 00037 void setSoftAbsAlpha(double a) { mSoftAbsAlpha = a; } 00038 00040 // Auxiliary Functions // 00042 00043 void checkEvolution(const double epsilon = 1e-6); 00044 00045 void displayState(); 00046 00047 protected: 00048 00049 double mSoftAbsAlpha; 00050 00051 MatrixXd mH; 00052 00053 VectorXd mLambda; 00054 VectorXd mGradHelper; 00055 00057 virtual void fComputeH() = 0; 00058 00059 void fComputeMetric(); 00060 void fPrepareSpatialGradients() { fComputeH(); gradV(); } 00061 00062 VectorXd& dTaudp(); 00063 VectorXd& dTaudq(); 00064 VectorXd& dPhidq(); 00065 00066 }; 00067 00068 #define _BETA_DIAGOUTERSOFTABSMETRIC_ 00069 #endif