ElInfo2d.h 3.55 KB
Newer Older
1
2
3
4
5
6
// ============================================================================
// ==                                                                        ==
// == AMDiS - Adaptive multidimensional simulations                          ==
// ==                                                                        ==
// ============================================================================
// ==                                                                        ==
7
// ==  TU Dresden                                                            ==
8
// ==                                                                        ==
9
10
11
// ==  Institut fr Wissenschaftliches Rechnen                               ==
// ==  Zellescher Weg 12-14                                                  ==
// ==  01069 Dresden                                                         ==
12
13
14
15
// ==  germany                                                               ==
// ==                                                                        ==
// ============================================================================
// ==                                                                        ==
16
// ==  https://gforge.zih.tu-dresden.de/projects/amdis/                      ==
17
18
19
20
21
22
23
24
// ==                                                                        ==
// ============================================================================

/** \file ElInfo2d.h */

#ifndef AMDIS_ELINFO2D_H
#define AMDIS_ELINFO2D_H

25
#include <boost/numeric/mtl/mtl.hpp>
26
27
28
29
30
31
32
33
34
35
36
#include "ElInfo.h"

namespace AMDiS {

  /** \ingroup Traverse
   * \brief
   * ElInfo class for 2-dimensional elements (\ref Triangle).
   */
  class ElInfo2d : public ElInfo
  {
  public:
37
    /// Constructor. Calls ElInfo's protected Constructor.
38
39
    ElInfo2d(Mesh* aMesh);

40
    ///
41
    ~ElInfo2d();
42

43
    /// 2-dimensional realisation of ElInfo's fillElInfo method.
44
45
    void fillElInfo(int ichild, const ElInfo *elinfo_old);

46
47
    /// 2-dimensional realisation of ElInfo's fillMacroInfo method.
    void fillMacroInfo(const MacroElement*);
48

49
    /// 2-dimensional realisation of ElInfo's worldToCoord method.
50
51
    const int worldToCoord(const WorldVector<double>& w, DimVec<double>* l) const;

52
    /// 2-dimensional realisation of ElInfo's calcGrdLambda method.
Thomas Witkowski's avatar
Thomas Witkowski committed
53
    double calcGrdLambda(DimVec<WorldVector<double> >& grd_lam);
54

55
    /// 2-dimensional realisation of ElInfo's getNormal method.
Thomas Witkowski's avatar
Thomas Witkowski committed
56
    double getNormal(int side, WorldVector<double> &normal);
57

58
    /// 2-dimensional realisation of ElInfo's getElementNormal method.
59
    double getElementNormal(WorldVector<double> &normal) const;
60

61
    mtl::dense2D<double>& getSubElemCoordsMat(int degree) const;
62

63
    mtl::dense2D<double>& getSubElemGradCoordsMat(int degree) const;
64

65
  protected:
66
    /// Temp vectors for function \ref calcGrdLambda.
67
    WorldVector<double> e1, e2, normal;
68
69
70
71
72
73

    static double mat_d1_left_val[3][3];
    static mtl::dense2D<double> mat_d1_left;

    static double mat_d1_right_val[3][3];
    static mtl::dense2D<double> mat_d1_right;
74
75
76
77
78
79

    static double mat_d2_left_val[6][6];
    static mtl::dense2D<double> mat_d2_left;

    static double mat_d2_right_val[6][6];
    static mtl::dense2D<double> mat_d2_right;
80
81
82
83
84
85
86
87
88
89
90
91

    static double mat_d3_left_val[10][10];
    static mtl::dense2D<double> mat_d3_left;

    static double mat_d3_right_val[10][10];
    static mtl::dense2D<double> mat_d3_right;

    static double mat_d4_left_val[15][15];
    static mtl::dense2D<double> mat_d4_left;

    static double mat_d4_right_val[15][15];
    static mtl::dense2D<double> mat_d4_right;
92
93
94
95
96
  };

}

#endif // AMDIS_ELINFO2D_H