ElInfo1d.h 3.34 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 ElInfo1d.h */

#ifndef AMDIS_ELINFO1D_H
#define AMDIS_ELINFO1D_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 1-dimensional elements (\ref Line).
   */
  class ElInfo1d : public ElInfo
  {
  public:
37
    /// Constructor. Calls ElInfo's protected Constructor.
38
39
40
    ElInfo1d(Mesh* aMesh) 
      : ElInfo(aMesh) 
    {}
41

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

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

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

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

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

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

Thomas Witkowski's avatar
Thomas Witkowski committed
60
61
    int getSideOfNeighbour(int i) 
    { 
62
      return (i + 1) % 2; 
63
    }
64

65
    mtl::dense2D<double>& getSubElemCoordsMat(int degree) const;
66

67
    mtl::dense2D<double>& getSubElemGradCoordsMat(int degree) const;
68
69
70
71
72
73
74
75
76
77
78
79
80

  protected:
    static double mat_d1_val[2][2];

    static mtl::dense2D<double> mat_d1;

    static double mat_d1_left_val[2][2];

    static mtl::dense2D<double> mat_d1_left;

    static double mat_d1_right_val[2][2];

    static mtl::dense2D<double> mat_d1_right;
81
82
83
84
85
86
87
88
89
90
91
92

    static double mat_d2_val[3][3];

    static mtl::dense2D<double> mat_d2;

    static double mat_d2_left_val[3][3];

    static mtl::dense2D<double> mat_d2_left;

    static double mat_d2_right_val[3][3];

    static mtl::dense2D<double> mat_d2_right;
93
94
95
96
97
  };

}

#endif // AMDIS_ELINFO1D_H