vtf-logo

SimplexModCondNum.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00008 #if !defined(__geom_SimplexModCondNum_h__)
00009 #define __geom_SimplexModCondNum_h__
00010 
00011 #if defined(DEBUG_geom) && !defined(DEBUG_SimplexModCondNum)
00012 #define DEBUG_SimplexModCondNum
00013 #endif
00014 
00015 #include "SimplexCondNum.h"
00016 #include "SimplexModDet.h"
00017 
00018 BEGIN_NAMESPACE_GEOM
00019 
00021 
00044 template<int N, typename T = double>
00045 class SimplexModCondNum :
00046   public SimplexCondNum<N,T> {
00047 private:
00048 
00049   typedef SimplexCondNum<N,T> Base;
00050 
00051 public:
00052 
00053   //
00054   // public typedefs
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   SimplexModCondNum() :
00077     Base()
00078   {}
00079 
00081   SimplexModCondNum(const SimplexModCondNum& other) :
00082     Base(other)
00083   {}
00084 
00085 
00087   SimplexModCondNum(const Simplex& s) :
00088     Base(s)
00089   {}
00090 
00092   SimplexModCondNum& 
00093   operator=(const SimplexModCondNum& other) {
00094     if (&other != this) {
00095       Base::operator=(other);
00096     }
00097     return *this;
00098   }
00099   
00101   ~SimplexModCondNum()
00102   {}
00103 
00105   //--------------------------------------------------------------------------
00109 
00110 
00112   using Base::getMatrix;
00113 
00115   using Base::getGradientMatrix;
00116 
00118   using Base::getDeterminant;
00119 
00121   using Base::getGradientDeterminant;
00122 
00124   using Base::computeContent;
00125 
00127   using Base::computeGradientContent;
00128 
00130   using Base::getDimension;
00131 
00133   using Base::getAdjointMatrix;
00134 
00136   using Base::getAdjointGradientMatrix;
00137 
00139   //--------------------------------------------------------------------------
00142 
00144   using Base::setFunction;
00145 
00147   using Base::set;
00148 
00150   //--------------------------------------------------------------------------
00153 
00155 
00164   Number
00165   operator()() const {
00166     return operator()(getDeterminant());
00167   }
00168 
00170 
00179   Number
00180   operator()(const Simplex& simplex) const {
00181     setFunction(simplex);
00182     return operator()(getDeterminant());
00183   }
00184 
00186 
00208   Number
00209   operator()(Number minDeterminant) const;
00210 
00212 
00221   void
00222   computeGradient(Vertex* gradient) const {
00223     return computeGradient(getDeterminant(), gradient);
00224   }
00225 
00227 
00248   void
00249   computeGradient(Number minDeterminant, Vertex* gradient) const;
00250 
00252 
00253 protected:
00254 
00256   Number
00257   computeFunction(const Number snj, const Number sna) const {
00258     return computeFunction(getDeterminant(), snj, sna);
00259   }
00260 
00262   Number
00263   computeFunction(Number minDeterminant, Number snj, Number sna) const;
00264   
00265 private:
00266 
00267   Number
00268   getH(const Number minDeterminant) const {
00269     return SimplexModDet<T>::getH(getDeterminant(), minDeterminant);
00270   }
00271 
00272 };
00273 
00274 END_NAMESPACE_GEOM
00275 
00276 #define __geom_SimplexModCondNum_ipp__
00277 #include "SimplexModCondNum.ipp"
00278 #undef __geom_SimplexModCondNum_ipp__
00279 
00280 #endif

Generated on Fri Aug 24 12:55:58 2007 for Computational Geometry Package by  doxygen 1.4.7