Liebe Gitlab-Nutzer, lieber Gitlab-Nutzer, es ist nun möglich sich mittels des ZIH-Logins/LDAP an unserem Dienst anzumelden. Ein Anmelden über dieses erzeugt ein neues Konto. Das alte Konto ist über den Reiter "Standard" erreichbar. Die Administratoren

Dear Gitlab user, it is now possible to log in to our service using the ZIH login/LDAP. Logging in via this will create a new account. The old account can be accessed via the "Standard" tab. The administrators

ElInfo3d.h 3.95 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 25 26
// ============================================================================
// ==                                                                        ==
// == AMDiS - Adaptive multidimensional simulations                          ==
// ==                                                                        ==
// ============================================================================
// ==                                                                        ==
// ==  crystal growth group                                                  ==
// ==                                                                        ==
// ==  Stiftung caesar                                                       ==
// ==  Ludwig-Erhard-Allee 2                                                 ==
// ==  53175 Bonn                                                            ==
// ==  germany                                                               ==
// ==                                                                        ==
// ============================================================================
// ==                                                                        ==
// ==  http://www.caesar.de/cg/AMDiS                                         ==
// ==                                                                        ==
// ============================================================================

/** \file ElInfo3d.h */

#ifndef AMDIS_ELINFO3D_H
#define AMDIS_ELINFO3D_H

#include "ElInfo.h"
#include "MemoryManager.h"
Thomas Witkowski's avatar
Thomas Witkowski committed
27
#include "OpenMP.h"
28 29 30 31 32 33 34 35 36 37 38 39

namespace AMDiS {

  /** \ingroup Traverse
   * \brief
   * ElInfo class for 3-dimensional elements (\ref Tetrahedron).
   */
  class ElInfo3d : public ElInfo
  {
  public:
    MEMORY_MANAGED(ElInfo3d);

40
    /// Constructor. Calls ElInfo's protected Constructor.
Thomas Witkowski's avatar
Thomas Witkowski committed
41 42 43
    ElInfo3d(Mesh* aMesh) 
      : ElInfo(aMesh) 
    {
Thomas Witkowski's avatar
Thomas Witkowski committed
44
      tmpWorldVecs.resize(4);
45
    }
46

47
    /// Assignment operator
48 49 50 51 52 53 54
    ElInfo3d& operator=(const ElInfo3d& rhs) {
      ElInfo::operator=(rhs);
      el_type = rhs.el_type;
      orientation = rhs.orientation;
      return *this;
    } 

55
    /// 3-dimensional realisation of ElInfo's fillElInfo method.
56 57
    void fillElInfo(int ichild, const ElInfo *elinfo_old);

58
    /// 3-dimensional realisation of ElInfo's fillMacroInfo method.
59 60
    void fillMacroInfo(const MacroElement *);

61
    /// 3-dimensional realisation of ElInfo's worldToCoord method.
62 63
    const int worldToCoord(const WorldVector<double>& w, DimVec<double>* l) const;

64
    /// 3-dimensional realisation of ElInfo's calcGrdLambda method.
Thomas Witkowski's avatar
Thomas Witkowski committed
65
    double calcGrdLambda(DimVec<WorldVector<double> >& grd_lam);
66

67
    /// 3-dimensional realisation of ElInfo's getNormal method.
Thomas Witkowski's avatar
Thomas Witkowski committed
68
    double getNormal(int side, WorldVector<double> &normal);
69

70
    /// update ElInfo after refinement (of some neighbours). Only in 3d!
71 72
    void update();

73
    /// get ElInfo's \ref el_type
74 75
    inline unsigned char getType() const { 
      return el_type; 
76
    }
77

78
    /// get ElInfo's \ref orientation
79 80
    inline signed char getOrientation() const { 
      return orientation; 
81
    }
82

83
    /// set ElInfo's \ref el_type to t
84 85
    inline void setType(unsigned char t) { 
      el_type = t; 
86
    }
87

88
    /// set ElInfo's \ref orientation to o
89 90
    inline void setOrientation(signed char o) { 
      orientation = o; 
91
    }
92

93 94
    void getRefSimplexCoords(const BasisFunction *basisFcts,
			     DimMat<double> *coords) const;
95

96 97 98
    void getSubElementCoords(const BasisFunction *basisFcts,
			     int iChild, 
			     DimMat<double> *coords) const;
99

100
  protected:
101
    /// \ref el 's type. Is Filled automatically by the traversal routines.
102 103 104 105 106 107 108
    unsigned char el_type;

    /** \brief
     * +/- 1: sign of the determinant of the transformation to the reference
     * element with vertices (0,0,0), (1,1,1), (1,1,0), (1,0,0).
     */
    signed char orientation;
Thomas Witkowski's avatar
Thomas Witkowski committed
109

110
    /// Tmp vectors used for calculations in calcGrdLambda and getNormal().
111
    std::vector< WorldVector<double> > tmpWorldVecs;
112 113 114 115 116
  };

}

#endif // AMDIS_ELINFO3D_H