// 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 __Quadrature_h__
#define __Quadrature_h__

#include "Tuple.hpp"
#include "EnumElemType.hpp"
#include "Eigen/Dense"

class Quadrature
{
public:
  typedef Eigen::Matrix<double,Eigen::Dynamic,3> PointVector;
  typedef Eigen::VectorXd RealVector;

  Quadrature():
    _order(0),
    _itemType(INVALID_ELEM)
    {
      ;
    } 
  
  Quadrature(unsigned int order, ElemType itemType):
    _order(order),
    _itemType(itemType)
    {
      ;
    } 
    
  ~Quadrature() { }

  const ElemType& getItemType() const { return _itemType; }
  
  ElemType& getItemType() { return _itemType; }

  unsigned int nbPoint() const { return _qPoint.rows(); }

  const PointVector& getQpoint() const { return _qPoint; }

  PointVector& getQpoint() { return _qPoint; }

  const RealVector& getWeight() const { return _weight; }

  RealVector& getWeight() { return _weight; }

  const unsigned int& getOrder() const { return _order; }
  
  unsigned int& getOrder() { return _order; }

private:
  
  unsigned int _order;
  
  ElemType _itemType;

  PointVector _qPoint;
  
  RealVector _weight;
};

#endif
