shapeFunction3d.hh

Go to the documentation of this file.
1 
6 #ifndef shapeFucntion3d_hh
7 #define shapeFucntion3d_hh
8 
9 #include "basics/typedefs.hh"
10 #include "basics/exceptions.hh"
11 #include "space/tmatrix.hh"
12 
13 namespace hp3D {
14 
15  // forward declaration
16  class Hexahedron;
17 
18  using concepts::Real;
19 
20  // ******************************************************* ShapeFunction3D **
21 
27  template<typename F>
29  public:
31 
33  uint n(uint i) const {
36  return n_[i]; }
38  void n(uint i, uint value) {
40  n_[i] = value;
41  }
42 
44  uint nq(uint i) const {
47  return nq_[i]; }
49  void nq(uint i, uint value) {
51  nq_[i] = value;
52  }
53 
55  const Real* values(uint i) const {
58  return values_[i]; }
60  void values(uint i, const Real* value) {
62  values_[i] = value;
63  }
64 
66  const Real* abscissas(uint i) const {
69  return abscissas_[i]; }
71  void abscissas(uint i, const Real* value) {
73  abscissas_[i] = value;
74  }
75 
77  const Real* weights(uint i) const {
80  return weights_[i]; }
82  void weights(uint i, const Real* value) {
84  weights_[i] = value;
85  }
86 
88  const concepts::TMatrixBase<F>* T() const {
90  return T_; }
92  void T(const concepts::TMatrixBase<F>* T) { T_ = T; }
93  private:
94  int n_[3], nq_[3];
95  const F* values_[3];
96  const Real* abscissas_[3], * weights_[3];
98  };
99 
100  template <class F>
102 
103 } // namespace hp3D
104 
105 #endif // shapeFucntion3d_hh
A 3D FEM element: a hexahedron.
Definition: hexahedron.hh:37
void weights(uint i, const Real *value)
Sets the weights of the quadrature rule.
#define conceptsAssert(cond, exc)
Assert that a certain condition is fulfilled.
Definition: exceptions.hh:394
uint n(uint i) const
Returns number of shape functions.
uint nq(uint i) const
Returns number of quadratur points.
const Real * abscissas_[3]
Exception class for assertions.
Definition: exceptions.hh:258
void T(const concepts::TMatrixBase< F > *T)
Sets the T matrix.
void nq(uint i, uint value)
Sets the number of quadratur points.
const Real * weights(uint i) const
Returns the weights of the quadrature rule.
const Real * abscissas(uint i) const
Returns the abscissas of the quadrature rule and the shape functions.
void values(uint i, const Real *value)
Sets the values of the shape functions.
void n(uint i, uint value)
Sets the number of shape functions.
const Real * values(uint i) const
Returns the values of the shape functions.
void abscissas(uint i, const Real *value)
Sets the abscissas of the quadrature rule and the shape functions.
An abstract class for a T matrix.
Definition: element.hh:37
ShapeFunction3D< F > makeShapeFunction3D(const Hexahedron &elm)
const Real * weights_[3]
const concepts::TMatrixBase< F > * T_
3D hp-FEM for H1-conforming elements.
Definition: meshDX.hh:23
Collecting the data of a 3D shape function in one class.
const concepts::TMatrixBase< F > * T() const
Returns the T matrix.
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich