ElInfo2d.h 2.94 KB
Newer Older
1
2
3
4
// ============================================================================
// ==                                                                        ==
// == AMDiS - Adaptive multidimensional simulations                          ==
// ==                                                                        ==
5
// ==  http://www.amdis-fem.org                                              ==
6
7
// ==                                                                        ==
// ============================================================================
8
9
10
11
12
13
14
15
16
17
18
19
//
// Software License for AMDiS
//
// Copyright (c) 2010 Dresden University of Technology 
// All rights reserved.
// Authors: Simon Vey, Thomas Witkowski et al.
//
// This file is part of AMDiS
//
// See also license.opensource.txt in the distribution.


20
21
22
23
24
25

/** \file ElInfo2d.h */

#ifndef AMDIS_ELINFO2D_H
#define AMDIS_ELINFO2D_H

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

namespace AMDiS {

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

41
    ///
42
    ~ElInfo2d();
43

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

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

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

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

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

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

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

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

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

    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;
75
76
77
78
79
80

    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;
81
82
83
84
85
86
87
88
89
90
91
92

    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;
93
94
95
96
97
  };

}

#endif // AMDIS_ELINFO2D_H