Skip to content
Snippets Groups Projects
ElInfo1d.h 3.24 KiB
Newer Older
// ============================================================================
// ==                                                                        ==
// == AMDiS - Adaptive multidimensional simulations                          ==
// ==                                                                        ==
// ============================================================================
// ==                                                                        ==
// ==  crystal growth group                                                  ==
// ==                                                                        ==
// ==  Stiftung caesar                                                       ==
// ==  Ludwig-Erhard-Allee 2                                                 ==
// ==  53175 Bonn                                                            ==
// ==  germany                                                               ==
// ==                                                                        ==
// ============================================================================
// ==                                                                        ==
// ==  http://www.caesar.de/cg/AMDiS                                         ==
// ==                                                                        ==
// ============================================================================

/** \file ElInfo1d.h */

#ifndef AMDIS_ELINFO1D_H
#define AMDIS_ELINFO1D_H

#include "ElInfo.h"
#include "MemoryManager.h"

namespace AMDiS {

  // ============================================================================
  // ===== class ElInfo1d =======================================================
  // ============================================================================

  /** \ingroup Traverse
   * \brief
   * ElInfo class for 1-dimensional elements (\ref Line).
   */
  class ElInfo1d : public ElInfo
  {
  public:
    MEMORY_MANAGED(ElInfo1d);

    /** \brief
     * Constructor. Calls ElInfo's protected Constructor.
     */
    ElInfo1d(Mesh* aMesh) 
      : ElInfo(aMesh) 
    {}

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

    /** \brief
     * 1-dimensional realisation of ElInfo's fillMacroInfo method.
     */
    void fillMacroInfo(const MacroElement *);

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

    /** \brief
     * 1-dimensional realisation of ElInfo's calcGrdLambda method.
     */
    double calcGrdLambda(DimVec<WorldVector<double> >& grd_lam);

    /** \brief
     * 1-dimensional realisation of ElInfo's getNormal method.
     */
    double getNormal(int side, WorldVector<double> &normal);

    /** \brief
     * 1-dimensional realisation of ElInfo's getElementNormal method.
     */
    double getElementNormal( WorldVector<double> &normal) const;

    void getRefSimplexCoords(DimMat<double> *coords) const;
    void getSubElementCoords(DimMat<double> *coords,
			     int iChild) const;

  };

}

#endif // AMDIS_ELINFO1D_H