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

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

template<typename FaceBasisFunctionType, typename ElementBasisFunctionType, typename FaceMappingFunctionType>
class FEManagerFaceHHO
{
public:
  typedef typename FaceBasisFunctionType::ShapeMatrix FaceShapeMatrixType;          
  typedef typename FaceBasisFunctionType::ShapeDerivMatrix FaceShapeDerivMatrixType;
  typedef typename ElementBasisFunctionType::ShapeMatrix ElementShapeMatrixType;          
  typedef typename ElementBasisFunctionType::ShapeDerivMatrix ElementShapeDerivMatrixType;
  typedef typename FaceMappingFunctionType::NormalVector NormalVectorType; 
  typedef typename FaceMappingFunctionType::CoordVector CoordVectorType; 
  typedef typename FaceMappingFunctionType::JacVector FaceJacobianVectorType; 
  typedef typename FaceMappingFunctionType::PointVector FaceQpointVectorType;     

  FEManagerFaceHHO ()
  {
    ;
  }

  ~FEManagerFaceHHO () { }

  const ElementShapeMatrixType& getElemFaceShapeFunction() const
  {
    return elementFaceBasisFunction.getShapeFunction();
  }
  const ElementShapeDerivMatrixType& getElemFaceShapeFunctionDeriv() const
  {
    return elementFaceBasisFunction.getShapeFunctionDeriv();
  }
  
  const FaceShapeMatrixType& getFaceShapeFunction() const
  {
    return faceBasisFunction.getShapeFunction();
  }
  const FaceShapeDerivMatrixType& getFaceShapeFunctionDeriv() const
  {
    return faceBasisFunction.getShapeFunctionDeriv();
  }

  const NormalVectorType& getFaceNormalVec() const
  {
    return faceMappingFunction.getNormalVec();
  }
  const FaceJacobianVectorType& getFaceJacobianWeightVec() const
  {
    return faceMappingFunction.getJacobianXweight();
  }
  const FaceQpointVectorType& getFaceQpointX() const
  {
    return faceMappingFunction.getQpointX();
  }

public:
  FaceBasisFunctionType faceBasisFunction;
  ElementBasisFunctionType elementFaceBasisFunction;
  
  FaceMappingFunctionType faceMappingFunction; 
  
  Quadrature sideQuadrature;
};

#endif
