Newer
Older
// ============================================================================
// == ==
// == AMDiS - Adaptive multidimensional simulations ==
// == ==

Thomas Witkowski
committed
// == http://www.amdis-fem.org ==
// == ==
// ============================================================================

Thomas Witkowski
committed
//
// 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.
/** \file ElInfo3d.h */
#ifndef AMDIS_ELINFO3D_H
#define AMDIS_ELINFO3D_H

Thomas Witkowski
committed
#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.
tmpWorldVecs.resize(3);
for (int i = 0; i < 3; i++)
tmpWorldVecs[i].resize(3);
/// Assignment operator
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) const;
/// update ElInfo after refinement (of some neighbours). Only in 3d!
/// get ElInfo's \ref orientation

Thomas Witkowski
committed
return orientation;
/// set ElInfo's \ref orientation to o

Thomas Witkowski
committed
orientation = o;
mtl::dense2D<double>& getSubElemCoordsMat(int degree) const;

Thomas Witkowski
committed
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;

Thomas Witkowski
committed
static double mat_d1_l12_right_val[4][4];
static mtl::dense2D<double> mat_d1_l12_right;

Thomas Witkowski
committed
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