ElInfo2d.h 3.2 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// ============================================================================
// ==                                                                        ==
// == AMDiS - Adaptive multidimensional simulations                          ==
// ==                                                                        ==
// ============================================================================
// ==                                                                        ==
// ==  crystal growth group                                                  ==
// ==                                                                        ==
// ==  Stiftung caesar                                                       ==
// ==  Ludwig-Erhard-Allee 2                                                 ==
// ==  53175 Bonn                                                            ==
// ==  germany                                                               ==
// ==                                                                        ==
// ============================================================================
// ==                                                                        ==
// ==  http://www.caesar.de/cg/AMDiS                                         ==
// ==                                                                        ==
// ============================================================================

/** \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
    void getRefSimplexCoords(const BasisFunction *basisFcts,
62
			     mtl::dense2D<double>& coords) const;
63

64
65
    void getSubElementCoords(const BasisFunction *basisFcts,
			     int iChild,
66
			     mtl::dense2D<double>& coords) const;
67

68
  protected:
69
    /// Temp vectors for function \ref calcGrdLambda.
70
    WorldVector<double> *e1, *e2, *normal;
71
72
73
74
75
76
77
78
79
80
81
82

    static double mat_d1_val[3][3];

    static mtl::dense2D<double> mat_d1;

    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;
83
84
85
86
87
  };

}

#endif // AMDIS_ELINFO2D_H