! ---------------------------------------------------------------------------
module prec_dp

use DataModule, only : dp
use sep
use adj_mod_dp

implicit none
real (dp), dimension (:), private,  pointer   :: pre

contains

subroutine prec_init_dp( pre_in )
  real(dp) , dimension (:),   pointer  :: pre_in

  pre => pre_in

end subroutine prec_init_dp
! ---------------------------------------------------------------------------
integer function prec_lop_dp( adj, add, model, data)
  logical            :: adj, add 
  real (dp), dimension(:) :: model, data 

  call adjnull(       adj, add, model, data)

  call prec_exec_dp ( adj, add, model, data)

  prec_lop_dp = 0

end function prec_lop_dp
! ---------------------------------------------------------------------------
subroutine prec_exec_dp  ( adj, add, model, data)
  logical            :: adj, add 
  real (dp), dimension(:) :: model, data

  if( adj) then
    model = model + data*pre
  else
    data = data + model*pre
  end if

end subroutine


end module prec_dp
