vtf-logo

SimplexJacQF.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00008 #if !defined(__geom_SimplexJacQF_h__)
00009 #define __geom_SimplexJacQF_h__
00010 
00011 #if defined(DEBUG_geom) && !defined(DEBUG_SimplexJacQF)
00012 #define DEBUG_SimplexJacQF
00013 #endif
00014 
00015 #include "SimplexJac.h"
00016 
00017 BEGIN_NAMESPACE_GEOM
00018 
00020 
00036 template<int N, typename T = double>
00037 class SimplexJacQF {
00038 private:
00039 
00040   typedef SimplexJac<N,T> Jacobian;
00041 
00042 public:
00043 
00044   //
00045   // Public types.
00046   //
00047 
00049   typedef T Number;
00050 
00052   typedef typename Jacobian::Vertex Vertex;
00053 
00055   typedef typename Jacobian::Simplex Simplex;
00056 
00058   typedef typename Jacobian::Matrix Matrix;
00059 
00060 private:
00061 
00062   //
00063   // Member data.
00064   //
00065 
00067   Jacobian _jacobian;
00068 
00069 public:
00070 
00071   //--------------------------------------------------------------------------
00074 
00076   SimplexJacQF() :
00077     _jacobian()
00078   {}
00079 
00081   SimplexJacQF(const SimplexJacQF& other) :
00082     _jacobian(other._jacobian)
00083   {}
00084 
00086   SimplexJacQF(const Simplex& s) :
00087     _jacobian(s)
00088   {}
00089 
00091   SimplexJacQF& 
00092   operator=(const SimplexJacQF& other) {
00093     if (&other != this) {
00094       _jacobian = other._jacobian;
00095     }
00096     return *this;
00097   }
00098   
00100   ~SimplexJacQF()
00101   {}
00102 
00104   //--------------------------------------------------------------------------
00107 
00109   const Matrix&
00110   getMatrix() const {
00111     return _jacobian.getMatrix();
00112   }
00113 
00115   const ads::FixedArray<N,Matrix>&
00116   getGradientMatrix() const {
00117     return _jacobian.getGradientMatrix();
00118   }
00119 
00121   Number
00122   getDeterminant() const {
00123     return _jacobian.getDeterminant();
00124   }
00125 
00127   const Vertex&
00128   getGradientDeterminant() const {
00129     return _jacobian.getGradientDeterminant();
00130   }
00131 
00133   Number
00134   computeContent() const {
00135     return _jacobian.computeContent();
00136   }
00137 
00139   void
00140   computeGradientContent(Vertex* grad) const {
00141     _jacobian.computeGradientContent(grad);
00142   }
00143 
00145   Vertex
00146   computeGradientContent() const {
00147     return _jacobian.computeGradientContent();
00148   }
00149 
00151   static
00152   int
00153   getDimension() {
00154     return N;
00155   }
00156 
00158   //--------------------------------------------------------------------------
00161 
00163   void
00164   setFunction(const Simplex& s) {
00165     _jacobian.setFunction(s);
00166   }
00167 
00169   void
00170   set(const Simplex& s) {
00171     _jacobian.set(s);
00172   }
00173 
00175 
00179   void
00180   setFunction(const geom::Simplex<N,ads::FixedArray<N+1,Number>,Number>& s) {
00181     Simplex t;
00182     projectToLowerDimension(s, &t);
00183     setFunction(t);
00184   }
00185 
00187 
00191   void
00192   setFunction(const geom::Simplex<N,ads::FixedArray<N+2,Number>,Number>& s) {
00193     Simplex t;
00194     projectToLowerDimension(s, &t);
00195     setFunction(t);
00196   }
00197 
00199 
00202   void
00203   set(const geom::Simplex<N,ads::FixedArray<N+1,Number>,Number>& s) {
00204     Simplex t;
00205     projectToLowerDimension(s, &t);
00206     set(t);
00207   }
00208 
00210 };
00211 
00212 END_NAMESPACE_GEOM
00213 
00214 #endif

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