// 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 2.1 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/copyleft/lesser.html. */

#ifndef __common_template_types_hpp__
#define __common_template_types_hpp__

#include "HHOPhysicalSpaceFEManager.hpp"
#include "HHOOrthoNormalPhysicalSpaceFEManager.hpp"
#include "Mesh.hpp"
#include "InputData.hpp"

struct CommonTemplateTypes 
{
  typedef Eigen::Matrix<double, Eigen::Dynamic, InputData::n_face_dofs, InputData::MajorOption(InputData::p_order)> EigenGlobalVectorType;
  typedef Eigen::Matrix<double, Eigen::Dynamic, InputData::n_dofs_ppo, InputData::MajorOption(InputData::p_order)> EigenHOGlobalSolutionType;
  typedef Eigen::Matrix<double, Eigen::Dynamic, InputData::n_dofs, InputData::MajorOption(InputData::p_order)> EigenGlobalSolutionType;

  typedef SpaMesh::Mesh<InputData::dim> MeshType;
  typedef HHOPhysicalSpaceFEManager<InputData::dim> FEManagerType;
  typedef Eigen::Matrix<double, 3, 1> Point;
  typedef Eigen::Matrix<double, InputData::dim, InputData::dim> DiffusivityValueType;
  typedef std::function<DiffusivityValueType(const Point &)> DiffusivityType;
  typedef std::function<double(const Point &)> LoadType;
  typedef std::function<double(const Point &)> ExactSolutionType;
  typedef std::function<Eigen::Matrix<double, InputData::dim, 1>(const Point &)> ExactGradientType;
};


#endif
