vtf-logo

SimplexAdjJac.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00008 #if !defined(__geom_SimplexAdjJac_h__)
00009 #define __geom_SimplexAdjJac_h__
00010 
00011 #if defined(DEBUG_geom) && !defined(DEBUG_SimplexAdjJac)
00012 #define DEBUG_SimplexAdjJac
00013 #endif
00014 
00015 #include "../../defs.h"
00016 
00017 #include "../../../ads/tensor/SquareMatrix.h"
00018 
00019 BEGIN_NAMESPACE_GEOM
00020 
00022 
00086 template<int N, typename T = double>
00087 class SimplexAdjJac
00088 {
00089 public:
00090 
00091   //
00092   // Public types.
00093   //
00094 
00096   typedef T Number;
00097 
00099   typedef ads::SquareMatrix<N,Number> Matrix;
00100 
00101 private:
00102 
00103   //
00104   // Member data.
00105   //
00106 
00107   // The adjoint (scaled inverse) of the Jacobian matrix.
00108   Matrix _matrix;
00109 
00110   // The gradient of the scaled inverse of the Jacobian matrix.
00111   ads::FixedArray<N,Matrix> _gradientMatrix;
00112 
00113 public:
00114 
00115   //--------------------------------------------------------------------------
00118 
00120   SimplexAdjJac() :
00121     _matrix(),
00122     _gradientMatrix()
00123   {}
00124 
00126   SimplexAdjJac(const SimplexAdjJac& other) :
00127     _matrix(other._matrix),
00128     _gradientMatrix(other._gradientMatrix)
00129   {}
00130 
00132   SimplexAdjJac(const Matrix& jacobian) {
00133     set(jacobian);
00134   }
00135 
00137   SimplexAdjJac& 
00138   operator=(const SimplexAdjJac& other) {
00139     if (&other != this) {
00140       _matrix = other._matrix;
00141       _gradientMatrix = other._gradientMatrix;
00142     }
00143     return *this;
00144   }
00145   
00147   ~SimplexAdjJac()
00148   {}
00149 
00151   //--------------------------------------------------------------------------
00154 
00156   const Matrix&
00157   getMatrix() const {
00158     return _matrix;
00159   }
00160 
00162   const ads::FixedArray<N,Matrix>&
00163   getGradientMatrix() const {
00164     return _gradientMatrix;
00165   }
00166 
00168   //--------------------------------------------------------------------------
00171 
00173   void
00174   setFunction(const Matrix& jacobian);
00175 
00177   void
00178   set(const Matrix& jacobian);
00179 
00181 
00182 };
00183 
00184 END_NAMESPACE_GEOM
00185 
00186 #define __geom_SimplexAdjJac_ipp__
00187 #include "SimplexAdjJac.ipp"
00188 #undef __geom_SimplexAdjJac_ipp__
00189 
00190 #endif

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