// ============================================================================ // == == // == AMDiS - Adaptive multidimensional simulations == // == == // ============================================================================ // == == // == TU Dresden == // == == // == Institut f�r Wissenschaftliches Rechnen == // == Zellescher Weg 12-14 == // == 01069 Dresden == // == germany == // == == // ============================================================================ // == == // == https://gforge.zih.tu-dresden.de/projects/amdis/ == // == == // ============================================================================ /** \file ElInfo3d.h */ #ifndef AMDIS_ELINFO3D_H #define AMDIS_ELINFO3D_H #include <boost/numeric/mtl/mtl.hpp> #include "ElInfo.h" namespace AMDiS { /** \ingroup Traverse * \brief * ElInfo class for 3-dimensional elements (\ref Tetrahedron). */ class ElInfo3d : public ElInfo { public: /// Constructor. Calls ElInfo's protected Constructor. ElInfo3d(Mesh* aMesh) : ElInfo(aMesh) { tmpWorldVecs.resize(3); for (int i = 0; i < 3; i++) tmpWorldVecs[i].resize(3); } /// Assignment operator ElInfo3d& operator=(const ElInfo3d& rhs) { ElInfo::operator=(rhs); elType = rhs.elType; orientation = rhs.orientation; return *this; } /// 3-dimensional realisation of ElInfo's fillElInfo method. void fillElInfo(int ichild, const ElInfo *elinfo_old); /// 3-dimensional realisation of ElInfo's fillMacroInfo method. void fillMacroInfo(const MacroElement *); /// 3-dimensional realisation of ElInfo's worldToCoord method. const int worldToCoord(const WorldVector<double>& w, DimVec<double>* l) const; /// 3-dimensional realisation of ElInfo's calcGrdLambda method. double calcGrdLambda(DimVec<WorldVector<double> >& grd_lam); /// 3-dimensional realisation of ElInfo's getNormal method. double getNormal(int side, WorldVector<double> &normal); /// update ElInfo after refinement (of some neighbours). Only in 3d! void update(); /// get ElInfo's \ref orientation inline signed char getOrientation() const { return orientation; } /// set ElInfo's \ref orientation to o inline void setOrientation(signed char o) { orientation = o; } mtl::dense2D<double>& getSubElemCoordsMat(int degree) const; mtl::dense2D<double>& getSubElemGradCoordsMat(int degree) const; protected: /** \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; /// Tmp vectors used for calculations in calcGrdLambda and getNormal(). std::vector< std::vector<double> > tmpWorldVecs; static double mat_d1_left_val[4][4]; static mtl::dense2D<double> mat_d1_left; static double mat_d1_l0_right_val[4][4]; static mtl::dense2D<double> mat_d1_l0_right; static double mat_d1_l12_right_val[4][4]; static mtl::dense2D<double> mat_d1_l12_right; static double mat_d4_left_val[35][35]; static mtl::dense2D<double> mat_d4_left; static double mat_d4_l0_right_val[35][35]; static mtl::dense2D<double> mat_d4_l0_right; static double mat_d4_l12_right_val[35][35]; static mtl::dense2D<double> mat_d4_l12_right; }; } #endif // AMDIS_ELINFO3D_H