!===============================================================================
!
! module_cg_proj_xbound.F90
!
!-------------------------------------------------------------------------------
!
! Copyright (C) 2016 Hinnerk Stueben
!
! 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/>.
!
!-------------------------------------------------------------------------------
# define LANGUAGE_FORTRAN
# include "defs.h"

!-------------------------------------------------------------------------------
module module_cg_proj_xbound

  implicit none
  include "mpif.h"

  integer, parameter :: recv = 0
  integer, parameter :: send = 1
  integer, parameter :: nodagger = 0
  integer, parameter :: dagger = 1

  integer, parameter :: xbound_spin(FWD:BWD, nodagger:dagger) = reshape( (/2, 1, 1, 2/), (/2, 2/) ) 

  integer, parameter :: xbound_type_sc22_r4 = MPI_REAL4
  integer, parameter :: xbound_type_sc22_r8 = MPI_REAL8
  integer, parameter :: xbound_type_sc22_r4s = MPI_REAL4
  integer, parameter :: xbound_type_sc22_r8s = MPI_REAL8

  integer, parameter :: xbound_tag = 0
  integer, parameter :: xbound_comm = MPI_COMM_WORLD

  integer, save :: xbound_count_proj(DIM)

  integer, save :: xbound_count_sc_r4(DIM)
  integer, save :: xbound_count_sc_r8(DIM)
  integer, save :: xbound_count_sc_r4s(DIM)
  integer, save :: xbound_count_sc_r8s(DIM)

  integer, save :: xbound_type_sc_r4(DIM)
  integer, save :: xbound_type_sc_r8(DIM)
  integer, save :: xbound_type_sc_r4s(DIM)
  integer, save :: xbound_type_sc_r8s(DIM)

  integer, save :: xbound_request(recv:send, FWD:BWD, DIM)

end

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