// SpaFEDTe, a Template based C++ library for creating 
// Discontinuous Finite Element Spaces,
// Copyright (C) 2012 Lorenzo Alessio Botti

/* This library is free software; you can redistribute it and/or */
/* modify it under the terms of the GNU Lesser General Public */ 
/* License as published by the Free Software Foundation either */ 
/* version 3.0 of the License, or (at your option) any later version. */

/* This software is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU */
/* Lesser General Public License for more details. */

/* You should have received a copy of the GNU Lesser General Public */
/* License along with this software; if not, a copy of the full */
/* GNU Lesser General Public License can be found at */
/* http://www.gnu.org/licenses/. */

#ifndef __collapsed_mapping_h
#define __collapsed_mapping_h

#include "Quadrature.hpp"
#include "Tuple.hpp"
#include "EnumElemType.hpp"
#include <stdexcept>
#include <cassert>
#include <iostream>
#include <cassert>

struct CollapsedMapping
{
  typedef Quadrature::PointVector PointVector;

  static void mapTriNE(PointVector& tpPointsN);
  static void mapTriEN(PointVector& tpPointsE);

  static void mapTetNE(PointVector& tpPointsN);
  static void mapTetEN(PointVector& tpPointsE);
  
  static void mapPrismNE(PointVector& tpPointsN);
  static void mapPrismEN(PointVector& tpPointsE);
  
  static void mapPyramidNE(PointVector& tpPointsN);
  static void mapPyramidEN(PointVector& tpPointsE);
  
  static Point3D mapEN(const Point3D& point, const ElemType itemType);
  static void mapEN(const PointVector& points, PointVector& mappedPoints, const ElemType itemType);
  static Point3D mapNE(const Point3D& point, const ElemType itemType);
  static void mapNE(const PointVector& points, PointVector& mappedPoints, const ElemType itemType);
};

#endif
