!===============================================================================
!
! module_rhmc_zolo.F90 - parameter storage for Zolotarev approximations
!
!-------------------------------------------------------------------------------
!
! Copyright (C) 2006-2007 Yoshifumi Nakamura
!
! This file is part of BQCD -- Berlin Quantum ChromoDynamics program
!
! BQCD 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 3 of the License, or
! (at your option) any later version.
!
! BQCD 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 BQCD.  If not, see <http://www.gnu.org/licenses/>.
!
!-------------------------------------------------------------------------------
! Editor: Taylor Haar
! Last modified: 20/03/2017
!-------------------------------------------------------------------------------
# include "defs.h"

!-------------------------------------------------------------------------------
module module_rhmc_zolo
  implicit none

  ! Zolotarev rational approxs are represented in the form
  !  R(z) = d_n * prod_k[ (z + c_k) / (z + b_k) ]
  ! where k = 1,...,shift.
  !
  ! The stored ratapp approximates K^{-exponent}
  ! over the range [min_rhmc, max_rhmc].

  type rational_approx_zolo
     integer                      :: shift
     REAL                         :: min_rhmc, max_rhmc, exponent, margin_factor
     REAL, dimension(:), pointer  :: c_k,b_k
     REAL                         :: d_n
  end type rational_approx_zolo

  type(rational_approx_zolo), save :: ratapp_zolo(0:10)

end module module_rhmc_zolo

!===============================================================================
