Go to the documentation of this file.00001
00002
00003
00004 #ifndef shapeFucntion3d_hh
00005 #define shapeFucntion3d_hh
00006
00007 #include "basics/typedefs.hh"
00008 #include "basics/exceptions.hh"
00009 #include "space/tmatrix.hh"
00010
00011 namespace hp3D {
00012
00013 using concepts::Real;
00014
00015
00016
00022 template<typename F>
00023 class ShapeFunction3D {
00024 public:
00025 ShapeFunction3D();
00026
00028 uint n(uint i) const {
00029 conceptsAssert(i < 3, concepts::Assertion());
00030 conceptsAssert(n_[i] != 0, concepts::Assertion());
00031 return n_[i]; }
00033 void n(uint i, uint value) {
00034 conceptsAssert(i < 3, concepts::Assertion());
00035 n_[i] = value;
00036 }
00037
00039 uint nq(uint i) const {
00040 conceptsAssert(i < 3, concepts::Assertion());
00041 conceptsAssert(nq_[i] != 0, concepts::Assertion());
00042 return nq_[i]; }
00044 void nq(uint i, uint value) {
00045 conceptsAssert(i < 3, concepts::Assertion());
00046 nq_[i] = value;
00047 }
00048
00050 const Real* values(uint i) const {
00051 conceptsAssert(i < 3, concepts::Assertion());
00052 conceptsAssert(values_[i] != 0, concepts::Assertion());
00053 return values_[i]; }
00055 void values(uint i, const Real* value) {
00056 conceptsAssert(i < 3, concepts::Assertion());
00057 values_[i] = value;
00058 }
00059
00061 const Real* abscissas(uint i) const {
00062 conceptsAssert(i < 3, concepts::Assertion());
00063 conceptsAssert(abscissas_[i] != 0, concepts::Assertion());
00064 return abscissas_[i]; }
00066 void abscissas(uint i, const Real* value) {
00067 conceptsAssert(i < 3, concepts::Assertion());
00068 abscissas_[i] = value;
00069 }
00070
00072 const Real* weights(uint i) const {
00073 conceptsAssert(i < 3, concepts::Assertion());
00074 conceptsAssert(weights_[i] != 0, concepts::Assertion());
00075 return weights_[i]; }
00077 void weights(uint i, const Real* value) {
00078 conceptsAssert(i < 3, concepts::Assertion());
00079 weights_[i] = value;
00080 }
00081
00083 const concepts::TMatrixBase<F>* T() const {
00084 conceptsAssert(T_ != 0, concepts::Assertion());
00085 return T_; }
00087 void T(const concepts::TMatrixBase<F>* T) { T_ = T; }
00088 private:
00089 int n_[3], nq_[3];
00090 const F* values_[3];
00091 const Real* abscissas_[3], * weights_[3];
00092 const concepts::TMatrixBase<F>* T_;
00093 };
00094
00095 }
00096
00097 #endif // shapeFucntion3d_hh