Toast++  1.0.2 (r.539)
Forward and inverse modelling in optical tomography
cub8_reg.h
1 // -*-C++-*-
2 // ==========================================================================
3 // Module libfe
4 // File cub8_reg.h
5 // Declaration of class Cube8_reg
6 //
7 // 8-noded regular cube (aligned with global coordinate axes)
8 //
9 // Node arrangement:
10 //
11 // z N6 N7 Side contains nodes
12 // ^ o-----------------o 0 (z=0) 0,1,2,3
13 // | /| /| 1 (z=a) 4,6,7,5
14 // | / | / | 2 (y=0) 0,4,5,1
15 // / | / | 3 (y=a) 2,3,7,6
16 // / | / | 4 (z=0) 0,2,6,4
17 // N4 o----+------------o N5 | 5 (z=a) 1,5,7,3
18 // | | | |
19 // | | ^ y | |
20 // | | / | |
21 // | | | |
22 // | o------------+----o
23 // | / N2 | / N3
24 // | / | /
25 // | / | /
26 // |/ |/
27 // o-----------------o --> x
28 // N0 N1
29 //
30 // Inheritance:
31 // ------------
32 // Element ----> Element3D ----> Cube8_reg
33 // ==========================================================================
34 
35 #ifndef __CUB8_REG_H
36 #define __CUB8_REG_H
37 
38 class Cube8_reg: public Element3D {
39 public:
40  Cube8_reg () { Node = new int[nNode()]; }
41  Cube8_reg (const Cube8_reg &el);
42  ~Cube8_reg () { delete []Node; }
43 
44  void Initialise (const NodeList &nlist);
45 
46  BYTE Type() const { return ELID_CUB8_REG; }
47  int nNode() const { return 8; }
48  int nSide() const { return 6; }
49  int nSideNode (int /*side*/) const { return 4; }
50  int SideNode (int side, int node) const;
51 
52  Point Local (const NodeList& nlist, const Point& glob) const;
53  Point NodeLocal (int node) const;
54 
55  RVector LocalShapeF (const Point &loc) const;
56  RDenseMatrix LocalShapeD (const Point &loc) const;
57  RVector GlobalShapeF (const NodeList& nlist, const Point& glob) const;
58  RDenseMatrix GlobalShapeD (const NodeList& nlist, const Point& glob) const;
59 
60  double IntF (int i) const;
61  RDenseMatrix ElasticityStiffnessMatrix (double modulus, double pratio)
62  const;
63 
64 private:
65  double dx, dy, dz; // cube edge lengths
66 
67 };
68 
69 #endif // !__CUB8_REG_H
Definition: ndlist.h:14
Definition: node.h:39
Definition: point.h:18
Definition: cub8_reg.h:38