00001
00002
00008 #if !defined(__geom_SimplexMeanRatio_h__)
00009 #define __geom_SimplexMeanRatio_h__
00010
00011 #if defined(DEBUG_geom) && !defined(DEBUG_SimplexMeanRatio)
00012 #define DEBUG_SimplexMeanRatio
00013 #endif
00014
00015 #include "SimplexJacQF.h"
00016
00017 #include <limits>
00018
00019 BEGIN_NAMESPACE_GEOM
00020
00022
00044 template<int N, typename T = double>
00045 class SimplexMeanRatio :
00046 public SimplexJacQF<N,T> {
00047 private:
00048
00049 typedef SimplexJacQF<N,T> Base;
00050
00051 public:
00052
00053
00054
00055
00056
00058 typedef T Number;
00059
00061 typedef typename Base::Vertex Vertex;
00062
00064 typedef typename Base::Simplex Simplex;
00065
00067 typedef typename Base::Matrix Matrix;
00068
00069 public:
00070
00071
00074
00076 SimplexMeanRatio() :
00077 Base()
00078 {}
00079
00081 SimplexMeanRatio(const SimplexMeanRatio& other) :
00082 Base(other)
00083 {}
00084
00086 SimplexMeanRatio(const Simplex& s) :
00087 Base(s)
00088 {}
00089
00091 SimplexMeanRatio&
00092 operator=(const SimplexMeanRatio& other) {
00093 if (&other != this) {
00094 Base::operator=(other);
00095 }
00096 return *this;
00097 }
00098
00100 ~SimplexMeanRatio()
00101 {}
00102
00104
00107
00109
00117 Number
00118 operator()() const;
00119
00121
00129 Number
00130 operator()(const Simplex& simplex) const {
00131 setFunction(simplex);
00132 return operator()();
00133 }
00134
00136
00144 void
00145 computeGradient(Vertex* gradient) const;
00146
00148
00152
00153
00155 using Base::getMatrix;
00156
00158 using Base::getGradientMatrix;
00159
00161 using Base::getDeterminant;
00162
00164 using Base::getGradientDeterminant;
00165
00167 using Base::computeContent;
00168
00170 using Base::computeGradientContent;
00171
00173 using Base::getDimension;
00174
00176
00177 protected:
00178
00180 Number
00181 computeFunctionGivenS2(Number s2) const;
00182
00183 };
00184
00185 END_NAMESPACE_GEOM
00186
00187 #define __geom_SimplexMeanRatio_ipp__
00188 #include "SimplexMeanRatio.ipp"
00189 #undef __geom_SimplexMeanRatio_ipp__
00190
00191 #endif