!===============================================================================
!
! module_cg_surface.F90
!
!-------------------------------------------------------------------------------
!
! Copyright (C) 2015-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_surface
  use typedef_surface
  type(type_surface2), dimension(:), pointer, save :: surface2_r4
  type(type_surface2), dimension(:), pointer, save :: surface2_r8
  type(type_surface2), dimension(DIM), target, save :: surface2_r4s
  type(type_surface2), dimension(DIM), target, save :: surface2_r8s
  type(type_surface2), dimension(:), pointer, save :: surface_halo2_r4
  type(type_surface2), dimension(:), pointer, save :: surface_halo2_r8
  type(type_surface2), dimension(DIM), target, save :: surface_halo2_r4s
  type(type_surface2), dimension(DIM), target, save :: surface_halo2_r8s
end

FOR field in _sc _sc22
FOR _rrs in _r4 _r4s _r8 _r8s
!-------------------------------------------------------------------------------
module module_surface %% field %% _rrs
  use module_cg_surface, surface2 => surface2 %% _rrs, surface_halo2 => surface_halo2 %% _rrs
end

ENDFOR
ENDFOR

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