














































C     Evolve the slice in the exact spacetime.
C $Header$

C
C Note that this code ignores any conformal factor set by the model,
C and thus wont work for models which try to set a conformal factor.
C At present "Minkowski/conf wave" is the only such model.
C




































































 


































































































































































 


















































































































































































































 



















































 










 








































































































































































































































 










                                
                                

                                
                                

                                
                                

                                









































































c
c

c

c
c
c
c
c
c
c
c
c

c

      subroutine Exact__slice_evolve(cctk_dim,cctk_gsh,cctk_lsh,cctk_lbn
     &d,cctk_ubnd,cctk_tile_min,cctk_tile_max,cctk_ash,cctk_alignment,cc
     &tk_alignment_offset,cctk_from,cctk_to,cctk_bbox,cctk_delta_time,cc
     &tk_time,cctk_delta_space,cctk_origin_space,cctk_levfac,cctk_levoff
     &,cctk_levoffdenom,cctk_timefac,cctk_convlevel,cctk_convfac,cctk_ng
     &hostzones,cctk_iteration,cctkGH,cctk_ash1,cctk_ash2,cctk_ash3, sli
     &cet,slicetmp1t,slicetmp1x,slicetmp1y,slicetmp1z,slicetmp2t,slicetm
     &p2x,slicetmp2y,slicetmp2z,slicex,slicey,slicez, Bertotti___Lambda,
     &Kasner_generalized___p1,Kasner_generalized___p2,Kasner_like___q,Le
     &maitre___Lambda,Lemaitre___R0,Lemaitre___epsilon0,Lemaitre___kappa
     &,Schwarzschild_Lemaitre___Lambda,Schwarzschild_Lemaitre___mass,ant
     &i_de_Sitter_Lambda___scale,constant_density_star___mass,constant_d
     &ensity_star___radius,de_Sitter_Lambda___scale,de_Sitter___scale,de
     &coded_exact_model, active_slicing_handle,alp,alp_p,alp_p_p,betax,b
     &etax_p,betax_p_p,betay,betay_p,betay_p_p,betaz,betaz_p,betaz_p_p,c
     &oarse_dx,coarse_dy,coarse_dz,conformal_state,dtalp,dtalp_p,dtalp_p
     &_p,dtbetax,dtbetax_p,dtbetax_p_p,dtbetay,dtbetay_p,dtbetay_p_p,dtb
     &etaz,dtbetaz_p,dtbetaz_p_p,dtlapse_state,dtshift_state,gxx,gxx_p,g
     &xx_p_p,gxy,gxy_p,gxy_p_p,gxz,gxz_p,gxz_p_p,gyy,gyy_p,gyy_p_p,gyz,g
     &yz_p,gyz_p_p,gzz,gzz_p,gzz_p_p,kxx,kxx_p,kxx_p_p,kxy,kxy_p,kxy_p_p
     &,kxz,kxz_p,kxz_p_p,kyy,kyy_p,kyy_p_p,kyz,kyz_p,kyz_p_p,kzz,kzz_p,k
     &zz_p_p,psi,psix,psixx,psixy,psixz,psiy,psiyy,psiyz,psiz,psizz,r,sh
     &ift_state,x,y,z)
      implicit none

      INTEGER cctk_dim
      integer, parameter :: cctki_use_cctk_dim = kind(cctk_dim)
      INTEGER cctk_gsh (cctk_dim)
      integer, parameter :: cctki_use_cctk_gsh = kind(cctk_gsh)
      INTEGER cctk_lsh (cctk_dim)
      integer, parameter :: cctki_use_cctk_lsh = kind(cctk_lsh)
      INTEGER cctk_lbnd (cctk_dim)
      integer, parameter :: cctki_use_cctk_lbnd = kind(cctk_lbnd)
      INTEGER cctk_ubnd (cctk_dim)
      integer, parameter :: cctki_use_cctk_ubnd = kind(cctk_ubnd)
      INTEGER cctk_tile_min (cctk_dim)
      integer, parameter :: cctki_use_cctk_tile_min = kind(cctk_tile_min
     &)
      INTEGER cctk_tile_max (cctk_dim)
      integer, parameter :: cctki_use_cctk_tile_max = kind(cctk_tile_max
     &)
      INTEGER cctk_ash (cctk_dim)
      integer, parameter :: cctki_use_cctk_ash = kind(cctk_ash)
      INTEGER cctk_alignment
      integer, parameter :: cctki_use_cctk_alignment = kind(cctk_alignme
     &nt)
      INTEGER cctk_alignment_offset
      integer, parameter :: cctki_use_cctk_alignment_offset = kind(cctk_
     &alignment_offset)
      INTEGER cctk_from (cctk_dim)
      integer, parameter :: cctki_use_cctk_from = kind(cctk_from)
      INTEGER cctk_to (cctk_dim)
      integer, parameter :: cctki_use_cctk_to = kind(cctk_to)
      INTEGER cctk_bbox (2*cctk_dim)
      integer, parameter :: cctki_use_cctk_bbox = kind(cctk_bbox)
      REAL*8 cctk_delta_time
      integer, parameter :: cctki_use_cctk_delta_time = kind(cctk_delta_
     &time)
      REAL*8 cctk_time
      integer, parameter :: cctki_use_cctk_time = kind(cctk_time)
      REAL*8 cctk_delta_space (cctk_dim)
      integer, parameter :: cctki_use_cctk_delta_space = kind(cctk_delta
     &_space)
      REAL*8 cctk_origin_space (cctk_dim)
      integer, parameter :: cctki_use_cctk_origin_space = kind(cctk_orig
     &in_space)
      INTEGER cctk_levfac (cctk_dim)
      integer, parameter :: cctki_use_cctk_levfac = kind(cctk_levfac)
      INTEGER cctk_levoff (cctk_dim)
      integer, parameter :: cctki_use_cctk_levoff = kind(cctk_levoff)
      INTEGER cctk_levoffdenom (cctk_dim)
      integer, parameter :: cctki_use_cctk_levoffdenom = kind(cctk_levof
     &fdenom)
      INTEGER cctk_timefac
      integer, parameter :: cctki_use_cctk_timefac = kind(cctk_timefac)
      INTEGER cctk_convlevel
      integer, parameter :: cctki_use_cctk_convlevel = kind(cctk_convlev
     &el)
      INTEGER cctk_convfac
      integer, parameter :: cctki_use_cctk_convfac = kind(cctk_convfac)
      INTEGER cctk_nghostzones (cctk_dim)
      integer, parameter :: cctki_use_cctk_nghostzones = kind(cctk_nghos
     &tzones)
      INTEGER cctk_iteration
      integer, parameter :: cctki_use_cctk_iteration = kind(cctk_iterati
     &on)
      integer*8 cctkGH
      integer, parameter :: cctki_use_cctkGH = kind(cctkGH)
      INTEGER cctk_ash1
      integer, parameter :: cctki_use_cctk_ash1 = kind(cctk_ash1)
      INTEGER cctk_ash2
      integer, parameter :: cctki_use_cctk_ash2 = kind(cctk_ash2)
      INTEGER cctk_ash3
      integer, parameter :: cctki_use_cctk_ash3 = kind(cctk_ash3)
      REAL*8, iNteNt(iN) :: alp (cctk_ash1,cctk_ash2,cctk_ash3)
      integer, parameter :: cctki_use_alp = kind(alp)
      REAL*8 :: kxx (cctk_ash1,cctk_ash2,cctk_ash3)
      integer, parameter :: cctki_use_kxx = kind(kxx)
      REAL*8 :: kxy (cctk_ash1,cctk_ash2,cctk_ash3)
      integer, parameter :: cctki_use_kxy = kind(kxy)
      REAL*8 :: kxz (cctk_ash1,cctk_ash2,cctk_ash3)
      integer, parameter :: cctki_use_kxz = kind(kxz)
      REAL*8 :: kyy (cctk_ash1,cctk_ash2,cctk_ash3)
      integer, parameter :: cctki_use_kyy = kind(kyy)
      REAL*8 :: kyz (cctk_ash1,cctk_ash2,cctk_ash3)
      integer, parameter :: cctki_use_kyz = kind(kyz)
      REAL*8 :: kzz (cctk_ash1,cctk_ash2,cctk_ash3)
      integer, parameter :: cctki_use_kzz = kind(kzz)
      REAL*8 :: gxx (cctk_ash1,cctk_ash2,cctk_ash3)
      integer, parameter :: cctki_use_gxx = kind(gxx)
      REAL*8 :: gxy (cctk_ash1,cctk_ash2,cctk_ash3)
      integer, parameter :: cctki_use_gxy = kind(gxy)
      REAL*8 :: gxz (cctk_ash1,cctk_ash2,cctk_ash3)
      integer, parameter :: cctki_use_gxz = kind(gxz)
      REAL*8 :: gyy (cctk_ash1,cctk_ash2,cctk_ash3)
      integer, parameter :: cctki_use_gyy = kind(gyy)
      REAL*8 :: gyz (cctk_ash1,cctk_ash2,cctk_ash3)
      integer, parameter :: cctki_use_gyz = kind(gyz)
      REAL*8 :: gzz (cctk_ash1,cctk_ash2,cctk_ash3)
      integer, parameter :: cctki_use_gzz = kind(gzz)
      REAL*8, iNteNt(iN) :: betax (cctk_ash1,cctk_ash2,cctk_ash3)
      integer, parameter :: cctki_use_betax = kind(betax)
      REAL*8, iNteNt(iN) :: betay (cctk_ash1,cctk_ash2,cctk_ash3)
      integer, parameter :: cctki_use_betay = kind(betay)
      REAL*8, iNteNt(iN) :: betaz (cctk_ash1,cctk_ash2,cctk_ash3)
      integer, parameter :: cctki_use_betaz = kind(betaz)
      INTEGER*4, iNteNt(iN) :: decoded_exact_model
      integer, parameter :: cctki_use_decoded_exact_model = kind(decoded
     &_exact_model)
      REAL*8 :: slicet (cctk_ash1,cctk_ash2,cctk_ash3)
      integer, parameter :: cctki_use_slicet = kind(slicet)
      REAL*8 :: slicex (cctk_ash1,cctk_ash2,cctk_ash3)
      integer, parameter :: cctki_use_slicex = kind(slicex)
      REAL*8 :: slicey (cctk_ash1,cctk_ash2,cctk_ash3)
      integer, parameter :: cctki_use_slicey = kind(slicey)
      REAL*8 :: slicez (cctk_ash1,cctk_ash2,cctk_ash3)
      integer, parameter :: cctki_use_slicez = kind(slicez)
      REAL*8 :: slicetmp1t (cctk_ash1,cctk_ash2,cctk_ash3)
      integer, parameter :: cctki_use_slicetmp1t = kind(slicetmp1t)
      REAL*8 :: slicetmp1x (cctk_ash1,cctk_ash2,cctk_ash3)
      integer, parameter :: cctki_use_slicetmp1x = kind(slicetmp1x)
      REAL*8 :: slicetmp1y (cctk_ash1,cctk_ash2,cctk_ash3)
      integer, parameter :: cctki_use_slicetmp1y = kind(slicetmp1y)
      REAL*8 :: slicetmp1z (cctk_ash1,cctk_ash2,cctk_ash3)
      integer, parameter :: cctki_use_slicetmp1z = kind(slicetmp1z)
      REAL*8 :: slicetmp2t (cctk_ash1,cctk_ash2,cctk_ash3)
      integer, parameter :: cctki_use_slicetmp2t = kind(slicetmp2t)
      REAL*8 :: slicetmp2x (cctk_ash1,cctk_ash2,cctk_ash3)
      integer, parameter :: cctki_use_slicetmp2x = kind(slicetmp2x)
      REAL*8 :: slicetmp2y (cctk_ash1,cctk_ash2,cctk_ash3)
      integer, parameter :: cctki_use_slicetmp2y = kind(slicetmp2y)
      REAL*8 :: slicetmp2z (cctk_ash1,cctk_ash2,cctk_ash3)
      integer, parameter :: cctki_use_slicetmp2z = kind(slicetmp2z)
      REAL*8, iNteNt(iN) :: x (cctk_ash1,cctk_ash2,cctk_ash3)
      integer, parameter :: cctki_use_x = kind(x)
      REAL*8, iNteNt(iN) :: y (cctk_ash1,cctk_ash2,cctk_ash3)
      integer, parameter :: cctki_use_y = kind(y)
      REAL*8, iNteNt(iN) :: z (cctk_ash1,cctk_ash2,cctk_ash3)
      integer, parameter :: cctki_use_z = kind(z)
      INTEGER*4, iNteNt(iN) :: conformal_state
      integer, parameter :: cctki_use_conformal_state = kind(conformal_s
     &tate)
      characTer*8, intent(IN) :: bertotti___lambda
      integer, parameter :: cctki_use_bertotti___lambda = kind(bertotti_
     &__lambda)
      characTer*8, intent(IN) :: kasner_generalized___p1
      integer, parameter :: cctki_use_kasner_generalized___p1 = kind(kas
     &ner_generalized___p1)
      characTer*8, intent(IN) :: kasner_generalized___p2
      integer, parameter :: cctki_use_kasner_generalized___p2 = kind(kas
     &ner_generalized___p2)
      characTer*8, intent(IN) :: kasner_like___q
      integer, parameter :: cctki_use_kasner_like___q = kind(kasner_like
     &___q)
      characTer*8, intent(IN) :: lemaitre___lambda
      integer, parameter :: cctki_use_lemaitre___lambda = kind(lemaitre_
     &__lambda)
      characTer*8, intent(IN) :: lemaitre___r0
      integer, parameter :: cctki_use_lemaitre___r0 = kind(lemaitre___r0
     &)
      characTer*8, intent(IN) :: lemaitre___epsilon0
      integer, parameter :: cctki_use_lemaitre___epsilon0 = kind(lemaitr
     &e___epsilon0)
      characTer*8, intent(IN) :: lemaitre___kappa
      integer, parameter :: cctki_use_lemaitre___kappa = kind(lemaitre__
     &_kappa)
      characTer*8, intent(IN) :: schwarzschild_lemaitre___lambda
      integer, parameter :: cctki_use_schwarzschild_lemaitre___lambda = 
     &kind(schwarzschild_lemaitre___lambda)
      characTer*8, intent(IN) :: schwarzschild_lemaitre___mass
      integer, parameter :: cctki_use_schwarzschild_lemaitre___mass = ki
     &nd(schwarzschild_lemaitre___mass)
      characTer*8, intent(IN) :: anti_de_sitter_lambda___scale
      integer, parameter :: cctki_use_anti_de_sitter_lambda___scale = ki
     &nd(anti_de_sitter_lambda___scale)
      characTer*8, intent(IN) :: constant_density_star___mass
      integer, parameter :: cctki_use_constant_density_star___mass = kin
     &d(constant_density_star___mass)
      characTer*8, intent(IN) :: constant_density_star___radius
      integer, parameter :: cctki_use_constant_density_star___radius = k
     &ind(constant_density_star___radius)
      characTer*8, intent(IN) :: de_sitter_lambda___scale
      integer, parameter :: cctki_use_de_sitter_lambda___scale = kind(de
     &_sitter_lambda___scale)
      characTer*8, intent(IN) :: de_sitter___scale
      integer, parameter :: cctki_use_de_sitter___scale = kind(de_sitter
     &___scale)
      characTer*8, intent(IN) :: active_slicing_handle
      integer, parameter :: cctki_use_active_slicing_handle = kind(activ
     &e_slicing_handle)
      characTer*8, intent(IN) :: alp_p
      integer, parameter :: cctki_use_alp_p = kind(alp_p)
      characTer*8, intent(IN) :: alp_p_p
      integer, parameter :: cctki_use_alp_p_p = kind(alp_p_p)
      characTer*8, intent(IN) :: betax_p
      integer, parameter :: cctki_use_betax_p = kind(betax_p)
      characTer*8, intent(IN) :: betax_p_p
      integer, parameter :: cctki_use_betax_p_p = kind(betax_p_p)
      characTer*8, intent(IN) :: betay_p
      integer, parameter :: cctki_use_betay_p = kind(betay_p)
      characTer*8, intent(IN) :: betay_p_p
      integer, parameter :: cctki_use_betay_p_p = kind(betay_p_p)
      characTer*8, intent(IN) :: betaz_p
      integer, parameter :: cctki_use_betaz_p = kind(betaz_p)
      characTer*8, intent(IN) :: betaz_p_p
      integer, parameter :: cctki_use_betaz_p_p = kind(betaz_p_p)
      characTer*8, intent(IN) :: coarse_dx
      integer, parameter :: cctki_use_coarse_dx = kind(coarse_dx)
      characTer*8, intent(IN) :: coarse_dy
      integer, parameter :: cctki_use_coarse_dy = kind(coarse_dy)
      characTer*8, intent(IN) :: coarse_dz
      integer, parameter :: cctki_use_coarse_dz = kind(coarse_dz)
      characTer*8, intent(IN) :: dtalp
      integer, parameter :: cctki_use_dtalp = kind(dtalp)
      characTer*8, intent(IN) :: dtalp_p
      integer, parameter :: cctki_use_dtalp_p = kind(dtalp_p)
      characTer*8, intent(IN) :: dtalp_p_p
      integer, parameter :: cctki_use_dtalp_p_p = kind(dtalp_p_p)
      characTer*8, intent(IN) :: dtbetax
      integer, parameter :: cctki_use_dtbetax = kind(dtbetax)
      characTer*8, intent(IN) :: dtbetax_p
      integer, parameter :: cctki_use_dtbetax_p = kind(dtbetax_p)
      characTer*8, intent(IN) :: dtbetax_p_p
      integer, parameter :: cctki_use_dtbetax_p_p = kind(dtbetax_p_p)
      characTer*8, intent(IN) :: dtbetay
      integer, parameter :: cctki_use_dtbetay = kind(dtbetay)
      characTer*8, intent(IN) :: dtbetay_p
      integer, parameter :: cctki_use_dtbetay_p = kind(dtbetay_p)
      characTer*8, intent(IN) :: dtbetay_p_p
      integer, parameter :: cctki_use_dtbetay_p_p = kind(dtbetay_p_p)
      characTer*8, intent(IN) :: dtbetaz
      integer, parameter :: cctki_use_dtbetaz = kind(dtbetaz)
      characTer*8, intent(IN) :: dtbetaz_p
      integer, parameter :: cctki_use_dtbetaz_p = kind(dtbetaz_p)
      characTer*8, intent(IN) :: dtbetaz_p_p
      integer, parameter :: cctki_use_dtbetaz_p_p = kind(dtbetaz_p_p)
      characTer*8, intent(IN) :: dtlapse_state
      integer, parameter :: cctki_use_dtlapse_state = kind(dtlapse_state
     &)
      characTer*8, intent(IN) :: dtshift_state
      integer, parameter :: cctki_use_dtshift_state = kind(dtshift_state
     &)
      characTer*8, intent(IN) :: gxx_p
      integer, parameter :: cctki_use_gxx_p = kind(gxx_p)
      characTer*8, intent(IN) :: gxx_p_p
      integer, parameter :: cctki_use_gxx_p_p = kind(gxx_p_p)
      characTer*8, intent(IN) :: gxy_p
      integer, parameter :: cctki_use_gxy_p = kind(gxy_p)
      characTer*8, intent(IN) :: gxy_p_p
      integer, parameter :: cctki_use_gxy_p_p = kind(gxy_p_p)
      characTer*8, intent(IN) :: gxz_p
      integer, parameter :: cctki_use_gxz_p = kind(gxz_p)
      characTer*8, intent(IN) :: gxz_p_p
      integer, parameter :: cctki_use_gxz_p_p = kind(gxz_p_p)
      characTer*8, intent(IN) :: gyy_p
      integer, parameter :: cctki_use_gyy_p = kind(gyy_p)
      characTer*8, intent(IN) :: gyy_p_p
      integer, parameter :: cctki_use_gyy_p_p = kind(gyy_p_p)
      characTer*8, intent(IN) :: gyz_p
      integer, parameter :: cctki_use_gyz_p = kind(gyz_p)
      characTer*8, intent(IN) :: gyz_p_p
      integer, parameter :: cctki_use_gyz_p_p = kind(gyz_p_p)
      characTer*8, intent(IN) :: gzz_p
      integer, parameter :: cctki_use_gzz_p = kind(gzz_p)
      characTer*8, intent(IN) :: gzz_p_p
      integer, parameter :: cctki_use_gzz_p_p = kind(gzz_p_p)
      characTer*8, intent(IN) :: kxx_p
      integer, parameter :: cctki_use_kxx_p = kind(kxx_p)
      characTer*8, intent(IN) :: kxx_p_p
      integer, parameter :: cctki_use_kxx_p_p = kind(kxx_p_p)
      characTer*8, intent(IN) :: kxy_p
      integer, parameter :: cctki_use_kxy_p = kind(kxy_p)
      characTer*8, intent(IN) :: kxy_p_p
      integer, parameter :: cctki_use_kxy_p_p = kind(kxy_p_p)
      characTer*8, intent(IN) :: kxz_p
      integer, parameter :: cctki_use_kxz_p = kind(kxz_p)
      characTer*8, intent(IN) :: kxz_p_p
      integer, parameter :: cctki_use_kxz_p_p = kind(kxz_p_p)
      characTer*8, intent(IN) :: kyy_p
      integer, parameter :: cctki_use_kyy_p = kind(kyy_p)
      characTer*8, intent(IN) :: kyy_p_p
      integer, parameter :: cctki_use_kyy_p_p = kind(kyy_p_p)
      characTer*8, intent(IN) :: kyz_p
      integer, parameter :: cctki_use_kyz_p = kind(kyz_p)
      characTer*8, intent(IN) :: kyz_p_p
      integer, parameter :: cctki_use_kyz_p_p = kind(kyz_p_p)
      characTer*8, intent(IN) :: kzz_p
      integer, parameter :: cctki_use_kzz_p = kind(kzz_p)
      characTer*8, intent(IN) :: kzz_p_p
      integer, parameter :: cctki_use_kzz_p_p = kind(kzz_p_p)
      characTer*8, intent(IN) :: psi
      integer, parameter :: cctki_use_psi = kind(psi)
      characTer*8, intent(IN) :: psix
      integer, parameter :: cctki_use_psix = kind(psix)
      characTer*8, intent(IN) :: psixx
      integer, parameter :: cctki_use_psixx = kind(psixx)
      characTer*8, intent(IN) :: psixy
      integer, parameter :: cctki_use_psixy = kind(psixy)
      characTer*8, intent(IN) :: psixz
      integer, parameter :: cctki_use_psixz = kind(psixz)
      characTer*8, intent(IN) :: psiy
      integer, parameter :: cctki_use_psiy = kind(psiy)
      characTer*8, intent(IN) :: psiyy
      integer, parameter :: cctki_use_psiyy = kind(psiyy)
      characTer*8, intent(IN) :: psiyz
      integer, parameter :: cctki_use_psiyz = kind(psiyz)
      characTer*8, intent(IN) :: psiz
      integer, parameter :: cctki_use_psiz = kind(psiz)
      characTer*8, intent(IN) :: psizz
      integer, parameter :: cctki_use_psizz = kind(psizz)
      characTer*8, intent(IN) :: r
      integer, parameter :: cctki_use_r = kind(r)
      characTer*8, intent(IN) :: shift_state
      integer, parameter :: cctki_use_shift_state = kind(shift_state)

c

      integer i,j,k,m,n
      integer nx,ny,nz
      integer ierr

      REAL*8 s1d(4,3), nd(4), nu(4), norm, gd(4,4), gu(4,4)
      REAL*8 dx,dy,dz,dt
      REAL*8 local_psi

C     Grid parameters.

      nx = cctk_lsh(1)
      ny = cctk_lsh(2)
      nz = cctk_lsh(3)

      dx = (cctk_delta_space(1)/cctk_levfac(1))
      dy = (cctk_delta_space(2)/cctk_levfac(2))
      dz = (cctk_delta_space(3)/cctk_levfac(3))

      dt = (cctk_delta_time/cctk_timefac)

C     Lax, or forward in time, step. 
C     dxA/dt has previously been stored in slicetmp2
C     by slice_data.

      slicetmp1x = slicex + 0.5d0 * dt * slicetmp2x
      slicetmp1y = slicey + 0.5d0 * dt * slicetmp2y
      slicetmp1z = slicez + 0.5d0 * dt * slicetmp2z
      slicetmp1t = slicet + 0.5d0 * dt * slicetmp2t

C     Synchronize and bound slice.

      call Exact__linear_extrap_one_bndry(cctk_dim,cctk_gsh,cctk_lsh,cct
     &k_lbnd,cctk_ubnd,cctk_tile_min,cctk_tile_max,cctk_ash,cctk_alignme
     &nt,cctk_alignment_offset,cctk_from,cctk_to,cctk_bbox,cctk_delta_ti
     &me,cctk_time,cctk_delta_space,cctk_origin_space,cctk_levfac,cctk_l
     &evoff,cctk_levoffdenom,cctk_timefac,cctk_convlevel,cctk_convfac,cc
     &tk_nghostzones,cctk_iteration,cctkGH,cctk_ash1,cctk_ash2,cctk_ash3
     &, slicet,slicetmp1t,slicetmp1x,slicetmp1y,slicetmp1z,slicetmp2t,sl
     &icetmp2x,slicetmp2y,slicetmp2z,slicex,slicey,slicez, Bertotti___La
     &mbda,Kasner_generalized___p1,Kasner_generalized___p2,Kasner_like__
     &_q,Lemaitre___Lambda,Lemaitre___R0,Lemaitre___epsilon0,Lemaitre___
     &kappa,Schwarzschild_Lemaitre___Lambda,Schwarzschild_Lemaitre___mas
     &s,anti_de_Sitter_Lambda___scale,constant_density_star___mass,const
     &ant_density_star___radius,de_Sitter_Lambda___scale,de_Sitter___sca
     &le,decoded_exact_model, active_slicing_handle,alp,alp_p,alp_p_p,be
     &tax,betax_p,betax_p_p,betay,betay_p,betay_p_p,betaz,betaz_p,betaz_
     &p_p,coarse_dx,coarse_dy,coarse_dz,conformal_state,dtalp,dtalp_p,dt
     &alp_p_p,dtbetax,dtbetax_p,dtbetax_p_p,dtbetay,dtbetay_p,dtbetay_p_
     &p,dtbetaz,dtbetaz_p,dtbetaz_p_p,dtlapse_state,dtshift_state,gxx,gx
     &x_p,gxx_p_p,gxy,gxy_p,gxy_p_p,gxz,gxz_p,gxz_p_p,gyy,gyy_p,gyy_p_p,
     &gyz,gyz_p,gyz_p_p,gzz,gzz_p,gzz_p_p,kxx,kxx_p,kxx_p_p,kxy,kxy_p,kx
     &y_p_p,kxz,kxz_p,kxz_p_p,kyy,kyy_p,kyy_p_p,kyz,kyz_p,kyz_p_p,kzz,kz
     &z_p,kzz_p_p,psi,psix,psixx,psixy,psixz,psiy,psiyy,psiyz,psiz,psizz
     &,r,shift_state,x,y,z,slicetmp1x)
      call Exact__linear_extrap_one_bndry(cctk_dim,cctk_gsh,cctk_lsh,cct
     &k_lbnd,cctk_ubnd,cctk_tile_min,cctk_tile_max,cctk_ash,cctk_alignme
     &nt,cctk_alignment_offset,cctk_from,cctk_to,cctk_bbox,cctk_delta_ti
     &me,cctk_time,cctk_delta_space,cctk_origin_space,cctk_levfac,cctk_l
     &evoff,cctk_levoffdenom,cctk_timefac,cctk_convlevel,cctk_convfac,cc
     &tk_nghostzones,cctk_iteration,cctkGH,cctk_ash1,cctk_ash2,cctk_ash3
     &, slicet,slicetmp1t,slicetmp1x,slicetmp1y,slicetmp1z,slicetmp2t,sl
     &icetmp2x,slicetmp2y,slicetmp2z,slicex,slicey,slicez, Bertotti___La
     &mbda,Kasner_generalized___p1,Kasner_generalized___p2,Kasner_like__
     &_q,Lemaitre___Lambda,Lemaitre___R0,Lemaitre___epsilon0,Lemaitre___
     &kappa,Schwarzschild_Lemaitre___Lambda,Schwarzschild_Lemaitre___mas
     &s,anti_de_Sitter_Lambda___scale,constant_density_star___mass,const
     &ant_density_star___radius,de_Sitter_Lambda___scale,de_Sitter___sca
     &le,decoded_exact_model, active_slicing_handle,alp,alp_p,alp_p_p,be
     &tax,betax_p,betax_p_p,betay,betay_p,betay_p_p,betaz,betaz_p,betaz_
     &p_p,coarse_dx,coarse_dy,coarse_dz,conformal_state,dtalp,dtalp_p,dt
     &alp_p_p,dtbetax,dtbetax_p,dtbetax_p_p,dtbetay,dtbetay_p,dtbetay_p_
     &p,dtbetaz,dtbetaz_p,dtbetaz_p_p,dtlapse_state,dtshift_state,gxx,gx
     &x_p,gxx_p_p,gxy,gxy_p,gxy_p_p,gxz,gxz_p,gxz_p_p,gyy,gyy_p,gyy_p_p,
     &gyz,gyz_p,gyz_p_p,gzz,gzz_p,gzz_p_p,kxx,kxx_p,kxx_p_p,kxy,kxy_p,kx
     &y_p_p,kxz,kxz_p,kxz_p_p,kyy,kyy_p,kyy_p_p,kyz,kyz_p,kyz_p_p,kzz,kz
     &z_p,kzz_p_p,psi,psix,psixx,psixy,psixz,psiy,psiyy,psiyz,psiz,psizz
     &,r,shift_state,x,y,z,slicetmp1y)
      call Exact__linear_extrap_one_bndry(cctk_dim,cctk_gsh,cctk_lsh,cct
     &k_lbnd,cctk_ubnd,cctk_tile_min,cctk_tile_max,cctk_ash,cctk_alignme
     &nt,cctk_alignment_offset,cctk_from,cctk_to,cctk_bbox,cctk_delta_ti
     &me,cctk_time,cctk_delta_space,cctk_origin_space,cctk_levfac,cctk_l
     &evoff,cctk_levoffdenom,cctk_timefac,cctk_convlevel,cctk_convfac,cc
     &tk_nghostzones,cctk_iteration,cctkGH,cctk_ash1,cctk_ash2,cctk_ash3
     &, slicet,slicetmp1t,slicetmp1x,slicetmp1y,slicetmp1z,slicetmp2t,sl
     &icetmp2x,slicetmp2y,slicetmp2z,slicex,slicey,slicez, Bertotti___La
     &mbda,Kasner_generalized___p1,Kasner_generalized___p2,Kasner_like__
     &_q,Lemaitre___Lambda,Lemaitre___R0,Lemaitre___epsilon0,Lemaitre___
     &kappa,Schwarzschild_Lemaitre___Lambda,Schwarzschild_Lemaitre___mas
     &s,anti_de_Sitter_Lambda___scale,constant_density_star___mass,const
     &ant_density_star___radius,de_Sitter_Lambda___scale,de_Sitter___sca
     &le,decoded_exact_model, active_slicing_handle,alp,alp_p,alp_p_p,be
     &tax,betax_p,betax_p_p,betay,betay_p,betay_p_p,betaz,betaz_p,betaz_
     &p_p,coarse_dx,coarse_dy,coarse_dz,conformal_state,dtalp,dtalp_p,dt
     &alp_p_p,dtbetax,dtbetax_p,dtbetax_p_p,dtbetay,dtbetay_p,dtbetay_p_
     &p,dtbetaz,dtbetaz_p,dtbetaz_p_p,dtlapse_state,dtshift_state,gxx,gx
     &x_p,gxx_p_p,gxy,gxy_p,gxy_p_p,gxz,gxz_p,gxz_p_p,gyy,gyy_p,gyy_p_p,
     &gyz,gyz_p,gyz_p_p,gzz,gzz_p,gzz_p_p,kxx,kxx_p,kxx_p_p,kxy,kxy_p,kx
     &y_p_p,kxz,kxz_p,kxz_p_p,kyy,kyy_p,kyy_p_p,kyz,kyz_p,kyz_p_p,kzz,kz
     &z_p,kzz_p_p,psi,psix,psixx,psixy,psixz,psiy,psiyy,psiyz,psiz,psizz
     &,r,shift_state,x,y,z,slicetmp1z)
      call Exact__linear_extrap_one_bndry(cctk_dim,cctk_gsh,cctk_lsh,cct
     &k_lbnd,cctk_ubnd,cctk_tile_min,cctk_tile_max,cctk_ash,cctk_alignme
     &nt,cctk_alignment_offset,cctk_from,cctk_to,cctk_bbox,cctk_delta_ti
     &me,cctk_time,cctk_delta_space,cctk_origin_space,cctk_levfac,cctk_l
     &evoff,cctk_levoffdenom,cctk_timefac,cctk_convlevel,cctk_convfac,cc
     &tk_nghostzones,cctk_iteration,cctkGH,cctk_ash1,cctk_ash2,cctk_ash3
     &, slicet,slicetmp1t,slicetmp1x,slicetmp1y,slicetmp1z,slicetmp2t,sl
     &icetmp2x,slicetmp2y,slicetmp2z,slicex,slicey,slicez, Bertotti___La
     &mbda,Kasner_generalized___p1,Kasner_generalized___p2,Kasner_like__
     &_q,Lemaitre___Lambda,Lemaitre___R0,Lemaitre___epsilon0,Lemaitre___
     &kappa,Schwarzschild_Lemaitre___Lambda,Schwarzschild_Lemaitre___mas
     &s,anti_de_Sitter_Lambda___scale,constant_density_star___mass,const
     &ant_density_star___radius,de_Sitter_Lambda___scale,de_Sitter___sca
     &le,decoded_exact_model, active_slicing_handle,alp,alp_p,alp_p_p,be
     &tax,betax_p,betax_p_p,betay,betay_p,betay_p_p,betaz,betaz_p,betaz_
     &p_p,coarse_dx,coarse_dy,coarse_dz,conformal_state,dtalp,dtalp_p,dt
     &alp_p_p,dtbetax,dtbetax_p,dtbetax_p_p,dtbetay,dtbetay_p,dtbetay_p_
     &p,dtbetaz,dtbetaz_p,dtbetaz_p_p,dtlapse_state,dtshift_state,gxx,gx
     &x_p,gxx_p_p,gxy,gxy_p,gxy_p_p,gxz,gxz_p,gxz_p_p,gyy,gyy_p,gyy_p_p,
     &gyz,gyz_p,gyz_p_p,gzz,gzz_p,gzz_p_p,kxx,kxx_p,kxx_p_p,kxy,kxy_p,kx
     &y_p_p,kxz,kxz_p,kxz_p_p,kyy,kyy_p,kyy_p_p,kyz,kyz_p,kyz_p_p,kzz,kz
     &z_p,kzz_p_p,psi,psix,psixx,psixy,psixz,psiy,psiyy,psiyz,psiz,psizz
     &,r,shift_state,x,y,z,slicetmp1t)

      call CCTK_SyncGroup(ierr,cctkGH,"Exact::Exact_slicetemp1")

C     Prepare leapfrog step.
C     Sum over interior points on the slice, now at midpoint slicetmp1.

      do k=2,nz-1
         do j=2,ny-1
            do i=2,nx-1

C     Calculate first derivatives of slice coordinates.

               s1d(1,1) = 0.5d0*(slicetmp1x(i+1,j,k) - slicetmp1x(i-1,j,
     &k))/dx
               s1d(1,2) = 0.5d0*(slicetmp1x(i,j+1,k) - slicetmp1x(i,j-1,
     &k))/dy
               s1d(1,3) = 0.5d0*(slicetmp1x(i,j,k+1) - slicetmp1x(i,j,k-
     &1))/dz

               s1d(2,1) = 0.5d0*(slicetmp1y(i+1,j,k) - slicetmp1y(i-1,j,
     &k))/dx
               s1d(2,2) = 0.5d0*(slicetmp1y(i,j+1,k) - slicetmp1y(i,j-1,
     &k))/dy
               s1d(2,3) = 0.5d0*(slicetmp1y(i,j,k+1) - slicetmp1y(i,j,k-
     &1))/dz

               s1d(3,1) = 0.5d0*(slicetmp1z(i+1,j,k) - slicetmp1z(i-1,j,
     &k))/dx
               s1d(3,2) = 0.5d0*(slicetmp1z(i,j+1,k) - slicetmp1z(i,j-1,
     &k))/dy
               s1d(3,3) = 0.5d0*(slicetmp1z(i,j,k+1) - slicetmp1z(i,j,k-
     &1))/dz

               s1d(4,1) = 0.5d0*(slicetmp1t(i+1,j,k) - slicetmp1t(i-1,j,
     &k))/dx
               s1d(4,2) = 0.5d0*(slicetmp1t(i,j+1,k) - slicetmp1t(i,j-1,
     &k))/dy
               s1d(4,3) = 0.5d0*(slicetmp1t(i,j,k+1) - slicetmp1t(i,j,k-
     &1))/dz

C     Now we need the exact solution metric in the preferred coordinates
C     x^A. 
               call Exact__metric(
     $              decoded_exact_model,
     $              slicetmp1x(i,j,k), slicetmp1y(i,j,k), slicetmp1z(i,j
     &,k), 
     $              slicetmp1t(i,j,k),
     $              gd(4,4), gd(1,4), gd(2,4), gd(3,4),
     $              gd(1,1), gd(2,2), gd(3,3), gd(1,2), gd(2,3), gd(1,3)
     &,
     $              gu(4,4), gu(1,4), gu(2,4), gu(3,4),
     $              gu(1,1), gu(2,2), gu(3,3), gu(1,2), gu(2,3), gu(1,3)
     &,
     $              local_psi)

C     Calculate n^A and dx^A/dt

C slice_normal.inc -- common code for computing n^A and dx^A/dt,
C                     used in ../slice_data.F and ../slice_evolve.F
C $Header$

C     Fill in remaining components of metric.
      do m=1,4
         do n=1,m-1
            gu(m,n) = gu(n,m)
            gd(m,n) = gd(n,m)
         end do
      end do

C     Calculate normal vector with respect to the slice, with indices down,
C     and not yet normalized.
C     n_A = epsilon_ABCD X^A_,1 X^B_,2 X^C_,3.
C     Easiest to hardwired this with an editor.
               nd(1) = s1d(2,1)*s1d(3,2)*s1d(4,3)
     $              + s1d(3,1)*s1d(4,2)*s1d(2,3)
     $              + s1d(4,1)*s1d(2,2)*s1d(3,3)
     $              - s1d(2,1)*s1d(4,2)*s1d(3,3)
     $              - s1d(4,1)*s1d(3,2)*s1d(2,3)
     $              - s1d(3,1)*s1d(2,2)*s1d(4,3)

               nd(2) = - s1d(3,1)*s1d(4,2)*s1d(1,3)
     $              - s1d(4,1)*s1d(1,2)*s1d(3,3)
     $              -s1d(1,1)*s1d(3,2)*s1d(4,3)
     $              + s1d(3,1)*s1d(1,2)*s1d(4,3)
     $              + s1d(1,1)*s1d(4,2)*s1d(3,3)
     $              + s1d(4,1)*s1d(3,2)*s1d(1,3)

               nd(3) = s1d(4,1)*s1d(1,2)*s1d(2,3)
     $              + s1d(1,1)*s1d(2,2)*s1d(4,3)
     $              + s1d(2,1)*s1d(4,2)*s1d(1,3)
     $              - s1d(4,1)*s1d(2,2)*s1d(1,3)
     $              - s1d(2,1)*s1d(1,2)*s1d(4,3)
     $              - s1d(1,1)*s1d(4,2)*s1d(2,3)

               nd(4) = s1d(1,1)*s1d(2,2)*s1d(3,3)
     $              + s1d(2,1)*s1d(3,2)*s1d(1,3)
     $              + s1d(3,1)*s1d(1,2)*s1d(2,3)
     $              - s1d(1,1)*s1d(3,2)*s1d(2,3)
     $              - s1d(3,1)*s1d(2,2)*s1d(1,3)
     $              - s1d(2,1)*s1d(1,2)*s1d(3,3)

C     Normalize normal vector and raise its index, both with the exact
C     solution metric.
C     - N^2 = g^AB n_A n_B).
               norm = 0.d0
               do m=1,4
                  do n=1,4
                     norm = norm + nd(m) * nd(n) * gu(m,n)
                  end do
               end do
C     Debugging test.
               if (norm .ge. 0.d0) then
                  write(6,*) 'slice normal no longer timelike'
                  write(6,*) 'grid point', i, j, k
                  write(6,*) 'x^i', x(i,j,k), y(i,j,k), z(i,j,k)
                  write(6,*) 'x^A', slicex(i,j,k), slicey(i,j,k), 
     $                 slicez(i,j,k), slicet(i,j,k)
                  write(6,*) 'n_A', nd(1), nd(2), nd(3), nd(4)
                  write(6,*) 'n_A n^A', norm
                  write(6,*)  'dx^A/dx^i'
                  do m=1,4
                     do n=1,3
                        write(6,*) m, n, s1d(m,n)
                     end do
                  end do
                  write(6,*)  'g^AB'
                  do m=1,4
                     do n=1,4
                        write(6,*) m, n, gu(m,n)
                     end do
                  end do
                  call CCTK_Warn(0,75,"slice_evolve.F","Exact", "abortin
     &g")
               end if
C     And now n^A = - 1/N g^AB n_B. (Sign so that it is future-pointing.)
               do m=1,4
                  nu(m) = 0.d0
                  do n=1,4
                     nu(m) = nu(m) + gu(m,n) * nd(n)
                  end do
                  nu(m) = - nu(m) / sqrt(-norm)
               end do

C     dX^A/dt = alpha n^A + beta^i X^A_,i. Store as a GF.
               slicetmp2x(i,j,k) = alp(i,j,k) * nu(1)
     $              + betax(i,j,k) * s1d(1,1)
     $              + betay(i,j,k) * s1d(1,2)
     $              + betaz(i,j,k) * s1d(1,3) 

               slicetmp2y(i,j,k) = alp(i,j,k) * nu(2)
     $              + betax(i,j,k) * s1d(2,1)
     $              + betay(i,j,k) * s1d(2,2)
     $              + betaz(i,j,k) * s1d(2,3) 

               slicetmp2z(i,j,k) = alp(i,j,k) * nu(3)
     $              + betax(i,j,k) * s1d(3,1)
     $              + betay(i,j,k) * s1d(3,2)
     $              + betaz(i,j,k) * s1d(3,3) 

               slicetmp2t(i,j,k) = alp(i,j,k) * nu(4)
     $              + betax(i,j,k) * s1d(4,1)
     $              + betay(i,j,k) * s1d(4,2)
     $              + betaz(i,j,k) * s1d(4,3) 



            end do
         end do
      end do

C     Synchronize and bound slicetmp2, which contains dx^A/dt.

      call Exact__linear_extrap_one_bndry(cctk_dim,cctk_gsh,cctk_lsh,cct
     &k_lbnd,cctk_ubnd,cctk_tile_min,cctk_tile_max,cctk_ash,cctk_alignme
     &nt,cctk_alignment_offset,cctk_from,cctk_to,cctk_bbox,cctk_delta_ti
     &me,cctk_time,cctk_delta_space,cctk_origin_space,cctk_levfac,cctk_l
     &evoff,cctk_levoffdenom,cctk_timefac,cctk_convlevel,cctk_convfac,cc
     &tk_nghostzones,cctk_iteration,cctkGH,cctk_ash1,cctk_ash2,cctk_ash3
     &, slicet,slicetmp1t,slicetmp1x,slicetmp1y,slicetmp1z,slicetmp2t,sl
     &icetmp2x,slicetmp2y,slicetmp2z,slicex,slicey,slicez, Bertotti___La
     &mbda,Kasner_generalized___p1,Kasner_generalized___p2,Kasner_like__
     &_q,Lemaitre___Lambda,Lemaitre___R0,Lemaitre___epsilon0,Lemaitre___
     &kappa,Schwarzschild_Lemaitre___Lambda,Schwarzschild_Lemaitre___mas
     &s,anti_de_Sitter_Lambda___scale,constant_density_star___mass,const
     &ant_density_star___radius,de_Sitter_Lambda___scale,de_Sitter___sca
     &le,decoded_exact_model, active_slicing_handle,alp,alp_p,alp_p_p,be
     &tax,betax_p,betax_p_p,betay,betay_p,betay_p_p,betaz,betaz_p,betaz_
     &p_p,coarse_dx,coarse_dy,coarse_dz,conformal_state,dtalp,dtalp_p,dt
     &alp_p_p,dtbetax,dtbetax_p,dtbetax_p_p,dtbetay,dtbetay_p,dtbetay_p_
     &p,dtbetaz,dtbetaz_p,dtbetaz_p_p,dtlapse_state,dtshift_state,gxx,gx
     &x_p,gxx_p_p,gxy,gxy_p,gxy_p_p,gxz,gxz_p,gxz_p_p,gyy,gyy_p,gyy_p_p,
     &gyz,gyz_p,gyz_p_p,gzz,gzz_p,gzz_p_p,kxx,kxx_p,kxx_p_p,kxy,kxy_p,kx
     &y_p_p,kxz,kxz_p,kxz_p_p,kyy,kyy_p,kyy_p_p,kyz,kyz_p,kyz_p_p,kzz,kz
     &z_p,kzz_p_p,psi,psix,psixx,psixy,psixz,psiy,psiyy,psiyz,psiz,psizz
     &,r,shift_state,x,y,z,slicetmp2x)
      call Exact__linear_extrap_one_bndry(cctk_dim,cctk_gsh,cctk_lsh,cct
     &k_lbnd,cctk_ubnd,cctk_tile_min,cctk_tile_max,cctk_ash,cctk_alignme
     &nt,cctk_alignment_offset,cctk_from,cctk_to,cctk_bbox,cctk_delta_ti
     &me,cctk_time,cctk_delta_space,cctk_origin_space,cctk_levfac,cctk_l
     &evoff,cctk_levoffdenom,cctk_timefac,cctk_convlevel,cctk_convfac,cc
     &tk_nghostzones,cctk_iteration,cctkGH,cctk_ash1,cctk_ash2,cctk_ash3
     &, slicet,slicetmp1t,slicetmp1x,slicetmp1y,slicetmp1z,slicetmp2t,sl
     &icetmp2x,slicetmp2y,slicetmp2z,slicex,slicey,slicez, Bertotti___La
     &mbda,Kasner_generalized___p1,Kasner_generalized___p2,Kasner_like__
     &_q,Lemaitre___Lambda,Lemaitre___R0,Lemaitre___epsilon0,Lemaitre___
     &kappa,Schwarzschild_Lemaitre___Lambda,Schwarzschild_Lemaitre___mas
     &s,anti_de_Sitter_Lambda___scale,constant_density_star___mass,const
     &ant_density_star___radius,de_Sitter_Lambda___scale,de_Sitter___sca
     &le,decoded_exact_model, active_slicing_handle,alp,alp_p,alp_p_p,be
     &tax,betax_p,betax_p_p,betay,betay_p,betay_p_p,betaz,betaz_p,betaz_
     &p_p,coarse_dx,coarse_dy,coarse_dz,conformal_state,dtalp,dtalp_p,dt
     &alp_p_p,dtbetax,dtbetax_p,dtbetax_p_p,dtbetay,dtbetay_p,dtbetay_p_
     &p,dtbetaz,dtbetaz_p,dtbetaz_p_p,dtlapse_state,dtshift_state,gxx,gx
     &x_p,gxx_p_p,gxy,gxy_p,gxy_p_p,gxz,gxz_p,gxz_p_p,gyy,gyy_p,gyy_p_p,
     &gyz,gyz_p,gyz_p_p,gzz,gzz_p,gzz_p_p,kxx,kxx_p,kxx_p_p,kxy,kxy_p,kx
     &y_p_p,kxz,kxz_p,kxz_p_p,kyy,kyy_p,kyy_p_p,kyz,kyz_p,kyz_p_p,kzz,kz
     &z_p,kzz_p_p,psi,psix,psixx,psixy,psixz,psiy,psiyy,psiyz,psiz,psizz
     &,r,shift_state,x,y,z,slicetmp2y)
      call Exact__linear_extrap_one_bndry(cctk_dim,cctk_gsh,cctk_lsh,cct
     &k_lbnd,cctk_ubnd,cctk_tile_min,cctk_tile_max,cctk_ash,cctk_alignme
     &nt,cctk_alignment_offset,cctk_from,cctk_to,cctk_bbox,cctk_delta_ti
     &me,cctk_time,cctk_delta_space,cctk_origin_space,cctk_levfac,cctk_l
     &evoff,cctk_levoffdenom,cctk_timefac,cctk_convlevel,cctk_convfac,cc
     &tk_nghostzones,cctk_iteration,cctkGH,cctk_ash1,cctk_ash2,cctk_ash3
     &, slicet,slicetmp1t,slicetmp1x,slicetmp1y,slicetmp1z,slicetmp2t,sl
     &icetmp2x,slicetmp2y,slicetmp2z,slicex,slicey,slicez, Bertotti___La
     &mbda,Kasner_generalized___p1,Kasner_generalized___p2,Kasner_like__
     &_q,Lemaitre___Lambda,Lemaitre___R0,Lemaitre___epsilon0,Lemaitre___
     &kappa,Schwarzschild_Lemaitre___Lambda,Schwarzschild_Lemaitre___mas
     &s,anti_de_Sitter_Lambda___scale,constant_density_star___mass,const
     &ant_density_star___radius,de_Sitter_Lambda___scale,de_Sitter___sca
     &le,decoded_exact_model, active_slicing_handle,alp,alp_p,alp_p_p,be
     &tax,betax_p,betax_p_p,betay,betay_p,betay_p_p,betaz,betaz_p,betaz_
     &p_p,coarse_dx,coarse_dy,coarse_dz,conformal_state,dtalp,dtalp_p,dt
     &alp_p_p,dtbetax,dtbetax_p,dtbetax_p_p,dtbetay,dtbetay_p,dtbetay_p_
     &p,dtbetaz,dtbetaz_p,dtbetaz_p_p,dtlapse_state,dtshift_state,gxx,gx
     &x_p,gxx_p_p,gxy,gxy_p,gxy_p_p,gxz,gxz_p,gxz_p_p,gyy,gyy_p,gyy_p_p,
     &gyz,gyz_p,gyz_p_p,gzz,gzz_p,gzz_p_p,kxx,kxx_p,kxx_p_p,kxy,kxy_p,kx
     &y_p_p,kxz,kxz_p,kxz_p_p,kyy,kyy_p,kyy_p_p,kyz,kyz_p,kyz_p_p,kzz,kz
     &z_p,kzz_p_p,psi,psix,psixx,psixy,psixz,psiy,psiyy,psiyz,psiz,psizz
     &,r,shift_state,x,y,z,slicetmp2z)
      call Exact__linear_extrap_one_bndry(cctk_dim,cctk_gsh,cctk_lsh,cct
     &k_lbnd,cctk_ubnd,cctk_tile_min,cctk_tile_max,cctk_ash,cctk_alignme
     &nt,cctk_alignment_offset,cctk_from,cctk_to,cctk_bbox,cctk_delta_ti
     &me,cctk_time,cctk_delta_space,cctk_origin_space,cctk_levfac,cctk_l
     &evoff,cctk_levoffdenom,cctk_timefac,cctk_convlevel,cctk_convfac,cc
     &tk_nghostzones,cctk_iteration,cctkGH,cctk_ash1,cctk_ash2,cctk_ash3
     &, slicet,slicetmp1t,slicetmp1x,slicetmp1y,slicetmp1z,slicetmp2t,sl
     &icetmp2x,slicetmp2y,slicetmp2z,slicex,slicey,slicez, Bertotti___La
     &mbda,Kasner_generalized___p1,Kasner_generalized___p2,Kasner_like__
     &_q,Lemaitre___Lambda,Lemaitre___R0,Lemaitre___epsilon0,Lemaitre___
     &kappa,Schwarzschild_Lemaitre___Lambda,Schwarzschild_Lemaitre___mas
     &s,anti_de_Sitter_Lambda___scale,constant_density_star___mass,const
     &ant_density_star___radius,de_Sitter_Lambda___scale,de_Sitter___sca
     &le,decoded_exact_model, active_slicing_handle,alp,alp_p,alp_p_p,be
     &tax,betax_p,betax_p_p,betay,betay_p,betay_p_p,betaz,betaz_p,betaz_
     &p_p,coarse_dx,coarse_dy,coarse_dz,conformal_state,dtalp,dtalp_p,dt
     &alp_p_p,dtbetax,dtbetax_p,dtbetax_p_p,dtbetay,dtbetay_p,dtbetay_p_
     &p,dtbetaz,dtbetaz_p,dtbetaz_p_p,dtlapse_state,dtshift_state,gxx,gx
     &x_p,gxx_p_p,gxy,gxy_p,gxy_p_p,gxz,gxz_p,gxz_p_p,gyy,gyy_p,gyy_p_p,
     &gyz,gyz_p,gyz_p_p,gzz,gzz_p,gzz_p_p,kxx,kxx_p,kxx_p_p,kxy,kxy_p,kx
     &y_p_p,kxz,kxz_p,kxz_p_p,kyy,kyy_p,kyy_p_p,kyz,kyz_p,kyz_p_p,kzz,kz
     &z_p,kzz_p_p,psi,psix,psixx,psixy,psixz,psiy,psiyy,psiyz,psiz,psizz
     &,r,shift_state,x,y,z,slicetmp2t)

      call CCTK_SyncGroup(ierr,cctkGH,"Exact::Exact_slicetemp2")

C Leapfrog step.

      slicex = slicex + dt * slicetmp2x
      slicey = slicey + dt * slicetmp2y
      slicez = slicez + dt * slicetmp2z
      slicet = slicet + dt * slicetmp2t

C     Synchronize and bound slice.

      call Exact__linear_extrap_one_bndry(cctk_dim,cctk_gsh,cctk_lsh,cct
     &k_lbnd,cctk_ubnd,cctk_tile_min,cctk_tile_max,cctk_ash,cctk_alignme
     &nt,cctk_alignment_offset,cctk_from,cctk_to,cctk_bbox,cctk_delta_ti
     &me,cctk_time,cctk_delta_space,cctk_origin_space,cctk_levfac,cctk_l
     &evoff,cctk_levoffdenom,cctk_timefac,cctk_convlevel,cctk_convfac,cc
     &tk_nghostzones,cctk_iteration,cctkGH,cctk_ash1,cctk_ash2,cctk_ash3
     &, slicet,slicetmp1t,slicetmp1x,slicetmp1y,slicetmp1z,slicetmp2t,sl
     &icetmp2x,slicetmp2y,slicetmp2z,slicex,slicey,slicez, Bertotti___La
     &mbda,Kasner_generalized___p1,Kasner_generalized___p2,Kasner_like__
     &_q,Lemaitre___Lambda,Lemaitre___R0,Lemaitre___epsilon0,Lemaitre___
     &kappa,Schwarzschild_Lemaitre___Lambda,Schwarzschild_Lemaitre___mas
     &s,anti_de_Sitter_Lambda___scale,constant_density_star___mass,const
     &ant_density_star___radius,de_Sitter_Lambda___scale,de_Sitter___sca
     &le,decoded_exact_model, active_slicing_handle,alp,alp_p,alp_p_p,be
     &tax,betax_p,betax_p_p,betay,betay_p,betay_p_p,betaz,betaz_p,betaz_
     &p_p,coarse_dx,coarse_dy,coarse_dz,conformal_state,dtalp,dtalp_p,dt
     &alp_p_p,dtbetax,dtbetax_p,dtbetax_p_p,dtbetay,dtbetay_p,dtbetay_p_
     &p,dtbetaz,dtbetaz_p,dtbetaz_p_p,dtlapse_state,dtshift_state,gxx,gx
     &x_p,gxx_p_p,gxy,gxy_p,gxy_p_p,gxz,gxz_p,gxz_p_p,gyy,gyy_p,gyy_p_p,
     &gyz,gyz_p,gyz_p_p,gzz,gzz_p,gzz_p_p,kxx,kxx_p,kxx_p_p,kxy,kxy_p,kx
     &y_p_p,kxz,kxz_p,kxz_p_p,kyy,kyy_p,kyy_p_p,kyz,kyz_p,kyz_p_p,kzz,kz
     &z_p,kzz_p_p,psi,psix,psixx,psixy,psixz,psiy,psiyy,psiyz,psiz,psizz
     &,r,shift_state,x,y,z,slicex)
      call Exact__linear_extrap_one_bndry(cctk_dim,cctk_gsh,cctk_lsh,cct
     &k_lbnd,cctk_ubnd,cctk_tile_min,cctk_tile_max,cctk_ash,cctk_alignme
     &nt,cctk_alignment_offset,cctk_from,cctk_to,cctk_bbox,cctk_delta_ti
     &me,cctk_time,cctk_delta_space,cctk_origin_space,cctk_levfac,cctk_l
     &evoff,cctk_levoffdenom,cctk_timefac,cctk_convlevel,cctk_convfac,cc
     &tk_nghostzones,cctk_iteration,cctkGH,cctk_ash1,cctk_ash2,cctk_ash3
     &, slicet,slicetmp1t,slicetmp1x,slicetmp1y,slicetmp1z,slicetmp2t,sl
     &icetmp2x,slicetmp2y,slicetmp2z,slicex,slicey,slicez, Bertotti___La
     &mbda,Kasner_generalized___p1,Kasner_generalized___p2,Kasner_like__
     &_q,Lemaitre___Lambda,Lemaitre___R0,Lemaitre___epsilon0,Lemaitre___
     &kappa,Schwarzschild_Lemaitre___Lambda,Schwarzschild_Lemaitre___mas
     &s,anti_de_Sitter_Lambda___scale,constant_density_star___mass,const
     &ant_density_star___radius,de_Sitter_Lambda___scale,de_Sitter___sca
     &le,decoded_exact_model, active_slicing_handle,alp,alp_p,alp_p_p,be
     &tax,betax_p,betax_p_p,betay,betay_p,betay_p_p,betaz,betaz_p,betaz_
     &p_p,coarse_dx,coarse_dy,coarse_dz,conformal_state,dtalp,dtalp_p,dt
     &alp_p_p,dtbetax,dtbetax_p,dtbetax_p_p,dtbetay,dtbetay_p,dtbetay_p_
     &p,dtbetaz,dtbetaz_p,dtbetaz_p_p,dtlapse_state,dtshift_state,gxx,gx
     &x_p,gxx_p_p,gxy,gxy_p,gxy_p_p,gxz,gxz_p,gxz_p_p,gyy,gyy_p,gyy_p_p,
     &gyz,gyz_p,gyz_p_p,gzz,gzz_p,gzz_p_p,kxx,kxx_p,kxx_p_p,kxy,kxy_p,kx
     &y_p_p,kxz,kxz_p,kxz_p_p,kyy,kyy_p,kyy_p_p,kyz,kyz_p,kyz_p_p,kzz,kz
     &z_p,kzz_p_p,psi,psix,psixx,psixy,psixz,psiy,psiyy,psiyz,psiz,psizz
     &,r,shift_state,x,y,z,slicey)
      call Exact__linear_extrap_one_bndry(cctk_dim,cctk_gsh,cctk_lsh,cct
     &k_lbnd,cctk_ubnd,cctk_tile_min,cctk_tile_max,cctk_ash,cctk_alignme
     &nt,cctk_alignment_offset,cctk_from,cctk_to,cctk_bbox,cctk_delta_ti
     &me,cctk_time,cctk_delta_space,cctk_origin_space,cctk_levfac,cctk_l
     &evoff,cctk_levoffdenom,cctk_timefac,cctk_convlevel,cctk_convfac,cc
     &tk_nghostzones,cctk_iteration,cctkGH,cctk_ash1,cctk_ash2,cctk_ash3
     &, slicet,slicetmp1t,slicetmp1x,slicetmp1y,slicetmp1z,slicetmp2t,sl
     &icetmp2x,slicetmp2y,slicetmp2z,slicex,slicey,slicez, Bertotti___La
     &mbda,Kasner_generalized___p1,Kasner_generalized___p2,Kasner_like__
     &_q,Lemaitre___Lambda,Lemaitre___R0,Lemaitre___epsilon0,Lemaitre___
     &kappa,Schwarzschild_Lemaitre___Lambda,Schwarzschild_Lemaitre___mas
     &s,anti_de_Sitter_Lambda___scale,constant_density_star___mass,const
     &ant_density_star___radius,de_Sitter_Lambda___scale,de_Sitter___sca
     &le,decoded_exact_model, active_slicing_handle,alp,alp_p,alp_p_p,be
     &tax,betax_p,betax_p_p,betay,betay_p,betay_p_p,betaz,betaz_p,betaz_
     &p_p,coarse_dx,coarse_dy,coarse_dz,conformal_state,dtalp,dtalp_p,dt
     &alp_p_p,dtbetax,dtbetax_p,dtbetax_p_p,dtbetay,dtbetay_p,dtbetay_p_
     &p,dtbetaz,dtbetaz_p,dtbetaz_p_p,dtlapse_state,dtshift_state,gxx,gx
     &x_p,gxx_p_p,gxy,gxy_p,gxy_p_p,gxz,gxz_p,gxz_p_p,gyy,gyy_p,gyy_p_p,
     &gyz,gyz_p,gyz_p_p,gzz,gzz_p,gzz_p_p,kxx,kxx_p,kxx_p_p,kxy,kxy_p,kx
     &y_p_p,kxz,kxz_p,kxz_p_p,kyy,kyy_p,kyy_p_p,kyz,kyz_p,kyz_p_p,kzz,kz
     &z_p,kzz_p_p,psi,psix,psixx,psixy,psixz,psiy,psiyy,psiyz,psiz,psizz
     &,r,shift_state,x,y,z,slicez)
      call Exact__linear_extrap_one_bndry(cctk_dim,cctk_gsh,cctk_lsh,cct
     &k_lbnd,cctk_ubnd,cctk_tile_min,cctk_tile_max,cctk_ash,cctk_alignme
     &nt,cctk_alignment_offset,cctk_from,cctk_to,cctk_bbox,cctk_delta_ti
     &me,cctk_time,cctk_delta_space,cctk_origin_space,cctk_levfac,cctk_l
     &evoff,cctk_levoffdenom,cctk_timefac,cctk_convlevel,cctk_convfac,cc
     &tk_nghostzones,cctk_iteration,cctkGH,cctk_ash1,cctk_ash2,cctk_ash3
     &, slicet,slicetmp1t,slicetmp1x,slicetmp1y,slicetmp1z,slicetmp2t,sl
     &icetmp2x,slicetmp2y,slicetmp2z,slicex,slicey,slicez, Bertotti___La
     &mbda,Kasner_generalized___p1,Kasner_generalized___p2,Kasner_like__
     &_q,Lemaitre___Lambda,Lemaitre___R0,Lemaitre___epsilon0,Lemaitre___
     &kappa,Schwarzschild_Lemaitre___Lambda,Schwarzschild_Lemaitre___mas
     &s,anti_de_Sitter_Lambda___scale,constant_density_star___mass,const
     &ant_density_star___radius,de_Sitter_Lambda___scale,de_Sitter___sca
     &le,decoded_exact_model, active_slicing_handle,alp,alp_p,alp_p_p,be
     &tax,betax_p,betax_p_p,betay,betay_p,betay_p_p,betaz,betaz_p,betaz_
     &p_p,coarse_dx,coarse_dy,coarse_dz,conformal_state,dtalp,dtalp_p,dt
     &alp_p_p,dtbetax,dtbetax_p,dtbetax_p_p,dtbetay,dtbetay_p,dtbetay_p_
     &p,dtbetaz,dtbetaz_p,dtbetaz_p_p,dtlapse_state,dtshift_state,gxx,gx
     &x_p,gxx_p_p,gxy,gxy_p,gxy_p_p,gxz,gxz_p,gxz_p_p,gyy,gyy_p,gyy_p_p,
     &gyz,gyz_p,gyz_p_p,gzz,gzz_p,gzz_p_p,kxx,kxx_p,kxx_p_p,kxy,kxy_p,kx
     &y_p_p,kxz,kxz_p,kxz_p_p,kyy,kyy_p,kyy_p_p,kyz,kyz_p,kyz_p_p,kzz,kz
     &z_p,kzz_p_p,psi,psix,psixx,psixy,psixz,psiy,psiyy,psiyz,psiz,psizz
     &,r,shift_state,x,y,z,slicet)

      call CCTK_SyncGroup(ierr,cctkGH,"Exact::Exact_slice")

C     Extract Cauchy data at the new position, and store dxA/dt 
C     for use in the next Lax step.

      call Exact__slice_data(cctk_dim,cctk_gsh,cctk_lsh,cctk_lbnd,cctk_u
     &bnd,cctk_tile_min,cctk_tile_max,cctk_ash,cctk_alignment,cctk_align
     &ment_offset,cctk_from,cctk_to,cctk_bbox,cctk_delta_time,cctk_time,
     &cctk_delta_space,cctk_origin_space,cctk_levfac,cctk_levoff,cctk_le
     &voffdenom,cctk_timefac,cctk_convlevel,cctk_convfac,cctk_nghostzone
     &s,cctk_iteration,cctkGH,cctk_ash1,cctk_ash2,cctk_ash3, slicet,slic
     &etmp1t,slicetmp1x,slicetmp1y,slicetmp1z,slicetmp2t,slicetmp2x,slic
     &etmp2y,slicetmp2z,slicex,slicey,slicez, Bertotti___Lambda,Kasner_g
     &eneralized___p1,Kasner_generalized___p2,Kasner_like___q,Lemaitre__
     &_Lambda,Lemaitre___R0,Lemaitre___epsilon0,Lemaitre___kappa,Schwarz
     &schild_Lemaitre___Lambda,Schwarzschild_Lemaitre___mass,anti_de_Sit
     &ter_Lambda___scale,constant_density_star___mass,constant_density_s
     &tar___radius,de_Sitter_Lambda___scale,de_Sitter___scale,decoded_ex
     &act_model, active_slicing_handle,alp,alp_p,alp_p_p,betax,betax_p,b
     &etax_p_p,betay,betay_p,betay_p_p,betaz,betaz_p,betaz_p_p,coarse_dx
     &,coarse_dy,coarse_dz,conformal_state,dtalp,dtalp_p,dtalp_p_p,dtbet
     &ax,dtbetax_p,dtbetax_p_p,dtbetay,dtbetay_p,dtbetay_p_p,dtbetaz,dtb
     &etaz_p,dtbetaz_p_p,dtlapse_state,dtshift_state,gxx,gxx_p,gxx_p_p,g
     &xy,gxy_p,gxy_p_p,gxz,gxz_p,gxz_p_p,gyy,gyy_p,gyy_p_p,gyz,gyz_p,gyz
     &_p_p,gzz,gzz_p,gzz_p_p,kxx,kxx_p,kxx_p_p,kxy,kxy_p,kxy_p_p,kxz,kxz
     &_p,kxz_p_p,kyy,kyy_p,kyy_p_p,kyz,kyz_p,kyz_p_p,kzz,kzz_p,kzz_p_p,p
     &si,psix,psixx,psixy,psixz,psiy,psiyy,psiyz,psiz,psizz,r,shift_stat
     &e,x,y,z)


      return
      end
