!---------------------------------------------------------------------------
! pmlib_parameters.f
!   version: 2D single-core
!---------------------------------------------------------------------------
!                  __    __
!    ___  _ _     / /__ / /
!   | _ \/ ` \ _ / // // _ \
!   | ,_/_,_,_\  \_/\_/\___/
!   |_|                      Mads M. Hejlesen* and Jens H. Walther*^
!                            * Technical University of Denmark
!                            ^ ETH-Zurich
!
!---------------------------------------------------------------------------
! Copyright (c) 2014 Technical University of Denmark, 
!                    Department of Mechanical Engineering
!
! This program is free software; you can redistribute it and/or modify
! it under the terms of the GNU General Public License as published by
! the Free Software Foundation; either version 2 of the License, or
! (at your option) any later version.
! 
! This program 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 General Public License for more details.
!
! You should have received a copy of the GNU General Public License
! along with this program; if not, see <http://www.gnu.org/licenses/>
!
! Contact: mmhej@mek.dtu.dk or jhwa@mek.dtu.dk
!---------------------------------------------------------------------------
MODULE pmlib_mod_parameters

USE pmlib_mod_write

IMPLICIT NONE
!----------------------------------------------------------------------------
! Arithmetic precision
!----------------------------------------------------------------------------
#ifdef __single
! Single precision
  INTEGER, PARAMETER               :: MK               = KIND(1E0)
  INTEGER, PARAMETER               :: MKC              = KIND(CMPLX(1E0,1E0,MK))
#elif __double
! Double precision
  INTEGER, PARAMETER               :: MK               = KIND(1D0)
  INTEGER, PARAMETER               :: MKC              = KIND(CMPLX(1D0,1D0,MK))
#else

#error "Arithmetic presicion is not defined"

#endif

  INTEGER, PARAMETER               :: MAXCHAR          = 256

!---------------------------------------------------------------------------
! Number of dimensions
!---------------------------------------------------------------------------
  INTEGER, PARAMETER               :: pmlib_ndim  = 2
  INTEGER, PARAMETER               :: pmlib_nvort = 1

!---------------------------------------------------------------------------
! Numerical parameters
!---------------------------------------------------------------------------
  REAL(MK)                         :: pmlib_regularisation_radius = 0.0_MK
  INTEGER                          :: pmlib_poisson_kernel = -99
  INTEGER                          :: pmlib_poisson_order = -99
  INTEGER                          :: pmlib_fd_order = -99
  INTEGER                          :: pmlib_interpolation_order = -99
  INTEGER                          :: pmlib_time_integration_order = -99

CONTAINS

#include "parameters/pmlib_parameters_check.f"

END MODULE pmlib_mod_parameters
