00001
00002
00008 #if !defined(__geom_SimplexAdjJac_h__)
00009 #define __geom_SimplexAdjJac_h__
00010
00011 #include "../../defs.h"
00012
00013 #include "../../../ads/tensor/SquareMatrix.h"
00014
00015 namespace geom {
00016
00018
00082 template < std::size_t N, typename T = double >
00083 class SimplexAdjJac {
00084 public:
00085
00086
00087
00088
00089
00091 typedef T Number;
00092
00094 typedef ads::SquareMatrix<N, Number> Matrix;
00095
00096 private:
00097
00098
00099
00100
00101
00102
00103 Matrix _matrix;
00104
00105
00106 std::tr1::array<Matrix, N> _gradientMatrix;
00107
00108 public:
00109
00110
00113
00115 SimplexAdjJac() :
00116 _matrix(),
00117 _gradientMatrix() {}
00118
00120 SimplexAdjJac(const SimplexAdjJac& other) :
00121 _matrix(other._matrix),
00122 _gradientMatrix(other._gradientMatrix) {}
00123
00125 SimplexAdjJac(const Matrix& jacobian) {
00126 set(jacobian);
00127 }
00128
00130 SimplexAdjJac&
00131 operator=(const SimplexAdjJac& other) {
00132 if (&other != this) {
00133 _matrix = other._matrix;
00134 _gradientMatrix = other._gradientMatrix;
00135 }
00136 return *this;
00137 }
00138
00140 ~SimplexAdjJac() {}
00141
00143
00146
00148 const Matrix&
00149 getMatrix() const {
00150 return _matrix;
00151 }
00152
00154 const std::tr1::array<Matrix, N>&
00155 getGradientMatrix() const {
00156 return _gradientMatrix;
00157 }
00158
00160
00163
00165 void
00166 setFunction(const Matrix& jacobian);
00167
00169 void
00170 set(const Matrix& jacobian);
00171
00173
00174 };
00175
00176 }
00177
00178 #define __geom_SimplexAdjJac_ipp__
00179 #include "SimplexAdjJac.ipp"
00180 #undef __geom_SimplexAdjJac_ipp__
00181
00182 #endif