Class documentation of Concepts

Loading...
Searching...
No Matches
shapeFunction2d.hh
Go to the documentation of this file.
1
6#ifndef shapeFunction2d_hh
7#define shapeFunction2d_hh
8
9#include "basics/typedefs.hh"
10#include "basics/exceptions.hh"
11#include "space/tmatrix.hh"
12
13namespace hp2D {
14
15 // forward declarations
16 template<class F>
17 class Quad;
18
19 using concepts::Real;
20
21 // ******************************************************* ShapeFunction2D **
22
28 template<typename F>
30 public:
33
35 uint n(uint i) const {
38 return n_[i]; }
40 void n(uint i, uint value) {
42 n_[i] = value;
43 }
44
46 uint nq(uint i) const {
48 conceptsAssert(nq_[i] != 0, concepts::Assertion());
49 return nq_[i]; }
51 void nq(uint i, uint value) {
53 nq_[i] = value;
54 }
55
57 const Real* values(uint i) const {
59 conceptsAssert(values_[i] != 0, concepts::Assertion());
60 return values_[i]; }
62 void values(uint i, const Real* value) {
64 values_[i] = value;
65 }
66
68 const Real* abscissas(uint i) const {
70 conceptsAssert(abscissas_[i] != 0, concepts::Assertion());
71 return abscissas_[i]; }
73 void abscissas(uint i, const Real* value) {
75 abscissas_[i] = value;
76 }
77
79 const Real* weights(uint i) const {
81 conceptsAssert(weights_[i] != 0, concepts::Assertion());
82 return weights_[i]; }
84 void weights(uint i, const Real* value) {
86 weights_[i] = value;
87 }
89 const concepts::TMatrixBase<F>* T() const { return T_; }
91 void T(const concepts::TMatrixBase<F>* T) { T_ = T; }
93 const concepts::TColumnTensor<bool, 2>* usedIdx() const { return usedIdx_;}
97 private:
98 int n_[2], nq_[2];
99 const F* values_[2];
100 const Real* abscissas_[2], * weights_[2];
101 const concepts::TMatrixBase<F>* T_;
102 const concepts::TColumnTensor<bool, 2>* usedIdx_;
103 };
104
105 // *************************************************** makeShapeFunction2D **
106
107 template<class F>
108 ShapeFunction2D<F>
109 makeShapeFunction2D(const Quad<F>& quad);
110
111} // namespace hp2D
112
113#endif // shapeFunction2d_hh
const concepts::TColumnTensor< bool, 2 > * usedIdx() const
Returns the used indices (local degrees of freedom)
uint nq(uint i) const
Returns number of quadratur points.
void T(const concepts::TMatrixBase< F > *T)
Sets the T matrix.
void weights(uint i, const Real *value)
Sets the weights of the quadrature rule.
void nq(uint i, uint value)
Sets the number of quadratur points.
const Real * values(uint i) const
Returns the values of the shape functions.
uint n(uint i) const
Returns number of shape functions.
void abscissas(uint i, const Real *value)
Sets the abscissas of the quadrature rule and the shape functions.
void values(uint i, const Real *value)
Sets the values of the shape functions.
const Real * weights(uint i) const
Returns the weights of the quadrature rule.
void usedIdx(const concepts::TColumnTensor< bool, 2 > *usedIdx)
Sets the used indices (ldof)
const concepts::TMatrixBase< F > * T() const
Returns the T matrix.
void n(uint i, uint value)
Sets the number of shape functions.
const Real * abscissas(uint i) const
Returns the abscissas of the quadrature rule and the shape functions.
#define conceptsAssert(cond, exc)
double Real
Definition typedefs.hh:39