Skip to content
Snippets Groups Projects
ElInfo1d.h 2.73 KiB
Newer Older
// ============================================================================
// ==                                                                        ==
// == AMDiS - Adaptive multidimensional simulations                          ==
// ==                                                                        ==
// ==                                                                        ==
// ============================================================================
//
// 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 ElInfo1d.h */

#ifndef AMDIS_ELINFO1D_H
#define AMDIS_ELINFO1D_H

#include <boost/numeric/mtl/mtl.hpp>
#include "ElInfo.h"

namespace AMDiS {

  /** \ingroup Traverse
   * \brief
   * ElInfo class for 1-dimensional elements (\ref Line).
   */
  class ElInfo1d : public ElInfo
  {
  public:
    /// Constructor. Calls ElInfo's protected Constructor.
    ElInfo1d(Mesh* aMesh) 
      : ElInfo(aMesh) 
    {}
    /// 1-dimensional realisation of ElInfo's fillElInfo method.
    void fillElInfo(int ichild, const ElInfo *elinfo_old);

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

    /// 1-dimensional realisation of ElInfo's calcGrdLambda method.
    double calcGrdLambda(DimVec<WorldVector<double> >& grd_lam);
    /// 1-dimensional realisation of ElInfo's getNormal method.
    double getNormal(int side, WorldVector<double> &normal) const;
    /// 1-dimensional realisation of ElInfo's getElementNormal method.
    double getElementNormal( WorldVector<double> &normal) const;

Thomas Witkowski's avatar
Thomas Witkowski committed
    int getSideOfNeighbour(int i) 
    { 
    mtl::dense2D<double>& getSubElemCoordsMat(int degree) const;
    mtl::dense2D<double>& getSubElemGradCoordsMat(int degree) const;

  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;

    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;
  };

}

#endif // AMDIS_ELINFO1D_H