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

#include "CollectiveBasisFunction.hpp"
#include "BasisFunction.hpp"
#include "CollectiveMappingFunction.hpp"
#include "MappingBasisFunction.hpp"
#include "Quadrature.hpp"

template<typename BasisFunctionType, typename MappingFunctionType>
class FEManagerHHO
{
public:
  typedef typename BasisFunctionType::ShapeMatrix ShapeMatrixType;          
  typedef typename BasisFunctionType::ShapeDerivMatrix ShapeDerivMatrixType;
  typedef typename MappingFunctionType::JacVector ElemJacobianVectorType;
  typedef typename MappingFunctionType::PointVector ElemQpointVectorType;

  FEManagerHHO ()
  {
    ;
  }

  ~FEManagerHHO() { }

  const ShapeMatrixType& getElemShapeFunction() const
  {
    return basisFunction.getShapeFunction();
  }
  const ShapeDerivMatrixType& getElemShapeFunctionDeriv() const
  {
    return basisFunction.getShapeFunctionDeriv();
  }
  const ShapeMatrixType& getElemShapeFunctionHO() const
  {
    return basisFunctionHO.getShapeFunction();
  }
  const ShapeDerivMatrixType& getElemShapeFunctionDerivHO() const
  {
    return basisFunctionHO.getShapeFunctionDeriv();
  }
  const ElemJacobianVectorType& getElemJacobianWeightVec() const
  {
    return mappingFunction.getJacobianXweight();
  }
  const ElemQpointVectorType& getElemQpointX() const
  {
    return mappingFunction.getQpointX();
  }
  const ElemJacobianVectorType& getElemJacobianWeightVecHO() const
  {
    return mappingFunctionHO.getJacobianXweight();
  }
  const ElemQpointVectorType& getElemQpointXHO() const
  {
    return mappingFunctionHO.getQpointX();
  }

public:
  // elements 
  BasisFunctionType basisFunction;
  BasisFunctionType basisFunctionHO;

  MappingFunctionType mappingFunction; 
  MappingFunctionType mappingFunctionHO; 
  
  Quadrature quadrature;
  Quadrature quadratureHO;
};

#endif
