Skip to content
Snippets Groups Projects
ElementInfo.h 2.73 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 ElementInfo.h */

#ifndef AMDIS_ELEMENTINFO_H
#define AMDIS_ELEMENTINFO_H

#include <list>
#include <vector>

#include "VertexInfo.h"
#include "Boundary.h"
#include "Projection.h"

namespace AMDiS {

  class VertexInfo;

  /** \brief
   * Stores information for one element.
   */
  class ElementInfo
    {
    public:
      /** \brief
       * Dimension specific constructor for DimVec creation.
       */
      ElementInfo(int dim) 
	: vertices(dim),
	vertexInfo(dim, NO_INIT),
	boundary(dim, NO_INIT),
	projection(dim, NO_INIT),
	neighbour(dim, NO_INIT),
	surfaceRegions(dim, NO_INIT)
	{};
      
      int vertices;
      
      /** \brief
       * Vertex infos for each element vertex.
       */
      DimVec< std::list<VertexInfo>::iterator> vertexInfo;
      
      /** \brief
       * Boundary type for each side.
       */
      DimVec<BoundaryType> boundary;
  
      /** \brief
       * Boundary projector for each side.
       */
      DimVec<Projection*> projection;
      
      /** \brief
       * Neighbour output index for each side.
       */
      DimVec<int> neighbour;
      
      /** \brief
       * Element type. Used in 3d.
       */
      unsigned char type;
      int elementRegion;
      DimVec<int> surfaceRegions;
    };
  
}

#endif