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

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

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

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

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

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

55
    /// 1-dimensional realisation of ElInfo's getNormal method.
56
    double getNormal(int side, WorldVector<double> &normal) const;
57

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

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

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

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

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

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

}

#endif // AMDIS_ELINFO1D_H